Chips float label does not work when value is updated programmatically
I'm submitting a ... (check one with "x")
[x] bug report => Search github for a similar issue or PR before submitting
[ ] feature request => Please check if request is not on the roadmap already https://github.com/primefaces/primeng/wiki/Roadmap
[ ] support request => Please do not submit support request here, instead see http://forum.primefaces.org/viewforum.php?f=35
Plunkr Case (Bug Reports) Please demonstrate your case at stackblitz by using the issue template below. Issues without a test case have much less possibility to be reviewd in detail and assisted.
https://stackblitz.com/github/primefaces/primeng-issue-template
Couldn't get stackblitz to work, but here you can find repro project here https://github.com/MaximShchukin/primeng-chips-issue2
Current behavior https://prnt.sc/uiwip0 Chips float label does not "float" when form value is updated programmatically
Expected behavior Float label works correctly with Chips
Minimal reproduction of the problem with instructions
- Create form with Chips control and float label
- try to update value programmatically like this:
this.form.patchValue({ cities: ["London", "New York"] });
What is the motivation / use case for changing the behavior? We want to use float labels with Chips
Please tell us about your environment: Windows, Visual Studio Code
-
Angular version: 5.X Angular 10.1.2
-
PrimeNG version: 5.X PrimeNG 10.0.0
-
Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ] all
-
Language: [all | TypeScript X.X | ES6/7 | ES5] Typescript 4.0.2
-
Node (for AoT issues):
node --version=
Here's a sample of the issue: https://stackblitz.com/edit/github-hzsp8u
The same issue with PrimeNg 11. @MaximShchukin did you find the workaround how to fix it?
The same issue with PrimeNg 11. @MaximShchukin did you find the workaround how to fix it?
The workaround would be to add class p-inputwrapper-filled to p-chip element.
This bug is still in master branch. As I understand, the solution is just to add this.updateFilledState() call into writeValue method. Could you fix it, please? Thank you!