-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Ability to clear listbox filter #4680
Comments
I have the same issue. When my listbox's filter is set to a value and that I want to reset this,
Sorry for my english. |
My work around was to use ViewChild and ElementRef to set input value to ' '. Please advise if there is a better solution |
Please share source on how to implement ViewChild and ElementRef work around |
@orwtech, I have found a cleaner workaround, add ngIf to this component to reinitialize it when you want to empty the value. Since it is binded using ngModel, the data should not change. component |
I am using 7.1.3 release and I am still unable to clear the input filter value even after binding a model attribute it to the new "filterValue" attribute. |
For those who still aren't able to clear the filter value: HTML:
Code:
|
@tundisto this worked in 9.## but after upgrading to 12 its not working |
I am working with primeng 15.2.0 and below code has worked for me.
|
There is no guarantee in receiving a response in GitHub Issue Tracker, If you'd like to secure our response, you may consider PrimeNG PRO Support where support is provided within 4 business hours
I'm submitting a bug report to Listbox component to be able to clear the filter input text when the listbox.filterValue is set to '', undefined, null... (check one with "x")
When listbox.filterValue = '' I would expect the component to react and clear the wrapped Input value.
Please advice on how to do this if this by design
Plunkr Case (Bug Reports)
Please fork the plunkr below and create a case demonstrating your bug report. Issues without a plunkr have much less possibility to be reviewed.
http://plnkr.co/edit/6q5v84DWolH6DeAdi70w?p=preview
Current behavior
Expected behavior
Minimal reproduction of the problem with instructions
What is the motivation / use case for changing the behavior?
Please tell us about your environment:
Language: [all | TypeScript X.X | ES6/7 | ES5]
Node (for AoT issues):
node --version
=The text was updated successfully, but these errors were encountered: