Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

float-label pInputText problem #10716

Closed
MatteoTrapasso opened this issue Oct 7, 2021 · 0 comments
Closed

float-label pInputText problem #10716

MatteoTrapasso opened this issue Oct 7, 2021 · 0 comments
Assignees
Labels
LTS-FIXED-10.1.4 Fixed in PrimeNG LTS 10.1.4 LTS-FIXED-11.4.7 Fixed in PrimeNG LTS 11.4.7 Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@MatteoTrapasso
Copy link
Contributor

when we preload the input data for the component pInputText, the label doesn't move up.
This is due to the missing method ngAfterViewInit() in the component.
In this link we can show a simulation error on stackblitz. Please don't interact with the application to display the error.

https://primeng-inputtext-demo-yetsfr.stackblitz.io/page

solution:
file inputtext.ts

export class InputText implements DoCheck, AfterViewInit {

    constructor(public el: ElementRef, @Optional() public ngModel: NgModel, private cd: ChangeDetectorRef) {}

    ngAfterViewInit() {
          this.cd.detectChanges();

   ...
    }
@MatteoTrapasso MatteoTrapasso reopened this Oct 7, 2021
MatteoTrapasso added a commit to MatteoTrapasso/primeng that referenced this issue Oct 7, 2021
@yigitfindikli yigitfindikli added the Status: Pending Review Issue or pull request is being reviewed by Core Team label Oct 7, 2021
@yigitfindikli yigitfindikli self-assigned this Oct 7, 2021
@yigitfindikli yigitfindikli added this to the 12.2.1 milestone Oct 7, 2021
yigitfindikli added a commit that referenced this issue Oct 8, 2021
#10716 float-label pInputText problem FIX
@yigitfindikli yigitfindikli added Type: Bug Issue contains a bug related to a specific component. Something about the component is not working LTS-PORTABLE and removed Status: Pending Review Issue or pull request is being reviewed by Core Team labels Oct 8, 2021
@yigitfindikli yigitfindikli added LTS-FIXED-11.4.7 Fixed in PrimeNG LTS 11.4.7 LTS-FIXED-10.1.4 Fixed in PrimeNG LTS 10.1.4 and removed LTS-PORTABLE labels Oct 18, 2021
volvachev pushed a commit to volvachev/primeng that referenced this issue Apr 13, 2022
…of `toggleMask` in the password component.

The problem appeared during fix of the bug primefaces#10716 (running `detectChanges` in `pInputText`). Detector ran a setter inside `ngClass` and did not run `doCheck` inside `ngClass`.

Fixes primefaces#11356, primefaces#11408.
volvachev added a commit to volvachev/primeng that referenced this issue Apr 13, 2022
…of `toggleMask` in the password component.

The problem appeared during fix of the bug primefaces#10716 (running `detectChanges` in `pInputText`). Setter has been ran by detector without running doCheck inside `ngClass`.

Fixes primefaces#11356, primefaces#11408.
volvachev added a commit to volvachev/primeng that referenced this issue Jun 2, 2022
…of `toggleMask` in the password component.

The problem appeared during fix of the bug primefaces#10716 (running `detectChanges` in `pInputText`). Setter has been ran by detector without running doCheck inside `ngClass`.

Fixes primefaces#11356, primefaces#11408.
mertsincan added a commit that referenced this issue Nov 8, 2022
…of `toggleMask` in the password component. (#11416)

The problem appeared during fix of the bug #10716 (running `detectChanges` in `pInputText`). Setter has been ran by detector without running doCheck inside `ngClass`.

Fixes #11356, #11408.

Co-authored-by: mertsincan <sincan.mert@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
LTS-FIXED-10.1.4 Fixed in PrimeNG LTS 10.1.4 LTS-FIXED-11.4.7 Fixed in PrimeNG LTS 11.4.7 Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
None yet
Development

No branches or pull requests

2 participants