primeng icon indicating copy to clipboard operation
primeng copied to clipboard

Dropdown with default value does not work properly with clear button

Open rafa-suagu opened this issue 8 years ago • 9 comments

I'm submitting a ...

[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) http://plnkr.co/edit/zIEhdMlGSNzCqmhZU41h?p=preview

Current behavior bug-dropdown

Expected behavior Open the dropdown.

Minimal reproduction of the problem with instructions

  1. Create a dropdown with selected/default value
  2. Click clear button
  3. Try to open the dropdown

What is the motivation / use case for changing the behavior? Obviously this error makes the dropdown unusable.

Please tell us about your environment: OS: MAC OS X High Sierra 10.13.3 IDE: WebStorm 2018.1 EAP Package Manager: Yarn 1.5.1 Node: 9.7.1 Angular-cli: 1.7.2

  • Angular version: 5.2.7

  • PrimeNG version: 5.2.1

  • Browser: all

  • Language: all

  • Node (for AoT issues): node --version = 9.7.1

rafa-suagu avatar Mar 07 '18 12:03 rafa-suagu

The clear button does not emit an onChange event. Is that an intended behavior?

perkma avatar Mar 07 '18 15:03 perkma

I don't know @perkma but for me is another bug

rafa-suagu avatar Mar 07 '18 15:03 rafa-suagu

It is performing the same way even in the demo. This needs to fixed soon as it breaks the entire dropdown and makes in unusable.

davisb10 avatar Mar 07 '18 18:03 davisb10

Agreed. The dropdown is unusable

blackholegalaxy avatar Mar 07 '18 18:03 blackholegalaxy

please make it optional.

nakurd avatar Mar 07 '18 22:03 nakurd

Observing the same behavior, and I agree our team needs the clear icon optional.

mlangwell avatar Mar 08 '18 14:03 mlangwell

Workaround to hide the clear button:

Add the following in global styes.scss:

p-dropdown {
  .ui-dropdown-clear-icon {
    display: none;
  }
}

jamieathans avatar Mar 08 '18 21:03 jamieathans

Any idea when this is going to be fixed? We need both the clear button and the dropdowns in our application

EleanorHughes avatar Mar 09 '18 16:03 EleanorHughes

5.2.2 is now published with this fix and others;

https://www.primefaces.org/primeng-5-2-2-released/

cagataycivici avatar Mar 09 '18 19:03 cagataycivici