-
Notifications
You must be signed in to change notification settings - Fork 8
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
Nimble combobox filter not updated on programmatically changing the value. #1266
Comments
I'll note that this is a FAST issue (which I will be filing one against them soon). Unfortunately, this isn't easy to workaround as the filter state that is causing this behavior is private and inaccessible to our implementation. Nor is there a good way for us to override behavior to subvert/alter changes to that private state. At the moment this appears like something that will have to be addressed in FAST directly, which will obviously delay when a fix will be available. |
It seems like there are a number of inconsistencies with how the combobox sets or clears its filter, e.g. based on whether you open the dropdown with a click or down arrow. I believe @atmgrifter00 will be trying to enumerate some of those problems in the issue he files to FAST. In the meantime, I think we can provide a stop-gap solution by modifying the private filter member like this: |
I just filed this issue to FAST. |
## 🤨 Rationale Fixes #1266 ## 👩💻 Implementation Overrided the `value` property setter to clear the (private) `filter` field and update filtered/selected items when not being set via typing. ## 🧪 Testing Manual testing in Storybook plus a new unit test. ## ✅ Checklist - [x] I have updated the project documentation to reflect my changes or determined no changes are needed. --------- Co-authored-by: Milan Raj <rajsite@users.noreply.github.com>
🐛 Bug Report
The filter for nimble combobox's filtered options stays the same after programmatically changing the combobox's value.
💻 Steps to recreate the behavior
Select an options from the combobox, manually delete a character from the input and select the previous option again.
Now change the combobox's value programmatically, either through devtools console or angular component(using combobox's element reference)
Now when clicked on the combobox it will show the previosly selected value in the below list option
🤔 Expected Behavior
When we change the selected option from the list option either via typing or selecting from the list by clicking and later update it programmatically, it should either display the list options or the selected option when clicked on it.
😯 Current Behavior
When we type something in the dropdown and then select an option from the filtered list, the filter text remains the same even after the combobox value is programmatically changed and when we click back on the combobox it still shows the previously filtered options list which doesn't seems relevant to the selected value. Attached gif below for reference
💁 Possible Solution
The filter could be reset to empty string on changing the combobox's value.
🔦 Context
🌍 Your Environment
The text was updated successfully, but these errors were encountered: