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

Chips float label does not work when value is updated programmatically #9289

Closed
MaksymShchukin opened this issue Sep 17, 2020 · 4 comments
Closed
Assignees
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@MaksymShchukin
Copy link

MaksymShchukin commented Sep 17, 2020

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

  1. Create form with Chips control and float label
  2. 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 =

@MaksymShchukin MaksymShchukin changed the title Chips float label bug when value is updated programmatically Chips float label does not work when value is updated programmatically Sep 21, 2020
@MaksymShchukin
Copy link
Author

Here's a sample of the issue:
https://stackblitz.com/edit/github-hzsp8u

@yigitfindikli yigitfindikli self-assigned this Nov 25, 2020
@yigitfindikli yigitfindikli added the Status: Pending Review Issue or pull request is being reviewed by Core Team label Nov 25, 2020
@KonstantinsS
Copy link

The same issue with PrimeNg 11. @MaximShchukin did you find the workaround how to fix it?

@KonstantinsS
Copy link

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.

@iskalyakin
Copy link

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!

iskalyakin added a commit to iskalyakin/primeng that referenced this issue Aug 5, 2021
@yigitfindikli yigitfindikli added Type: Bug Issue contains a bug related to a specific component. Something about the component is not working and removed Status: Pending Review Issue or pull request is being reviewed by Core Team labels Nov 30, 2021
@yigitfindikli yigitfindikli added this to the 13.0.1 milestone Nov 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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

4 participants