-
Notifications
You must be signed in to change notification settings - Fork 77
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
calcite-list - changing filter-text property/attribute does not filter the list items #6633
Comments
Q: Any current workarounds to this issue? I just need to change the filter via code... we should be able to do this somehow, no? |
@jgrayson-apl Not ideal by any means, but could you give this a try? https://codepen.io/jcfranco/pen/PoyzwKx?editors=0010 |
@jcfranco yes kinda hacky but ok for a workaround, I was able to adapt the concepts to a couple of apps. Thank you very much. |
I think this needs to be fixed in the filter component. The filter component doesn't emit an event when the filterText changes programmatically. The issue is that when filterText is changed programmatically the filteredItems property changes after a debounce so there's no way to know when to grab that new data. The filter would either need to emit or have another event for when the filteredItems changes. |
@jcfranco what are your thoughts regarding how filter can let other components know when the filterText changes? |
@jcfranco I'd like to get this going. What do you think about...
|
Since you guys are thinking about this issue... I would like to have the ability to set/override a 'filter' function/callback (like we can do with simple arrays) where I could perform my own more complex checks to determine if an item passes the test. There are many times when entering text in the input is not what we need. Sometimes we have multiple criteria to consider or even a simple discrete set of options that we want to filter on. Probably beyond what is going on here, but thought I'd mention anyways. |
@driskull I think we could proceed with your first suggestion and introduce a @jgrayson-apl #3454 might cover your request. |
**Related Issue:** #6633 ## Summary - Adds public filter method to the calcite-filter component. - Fixes setting `filteredItems` on filter. - Adds test
Installed and assigned for verification. |
Actual Behavior
The list of calcite-list-items is not updated/changed/filtered when changing the filter-text property/attribute of the calcite-list via code.
Expected Behavior
I would expect the list of calcite-list-items to be updated/changed/filtered when changing the filter-text property/attribute of the calcite-list via code.
Reproduction Sample
https://codepen.io/john-grayson/pen/ZEMMqdX
Reproduction Steps
Reproduction Version
1.07
Relevant Info
No response
Regression?
No response
Priority impact
p4 - not time sensitive
Impact
No response
Esri team
N/A
The text was updated successfully, but these errors were encountered: