-
Notifications
You must be signed in to change notification settings - Fork 85
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
Filterable Select with object values #7064
Labels
Comments
FE-6901 |
We're keen to address this as part of the RFC and rewrite work we have planned for the Select components. We suspect it will require some rewriting of code which seems redundant when the whole component is soon to be rewritten etc. In the mean time we think a workaround is available, if this is not the case for you please let us know and we'll increase the priority of this. @nicktitchmarsh fyi |
mihai-albu-sage
added a commit
that referenced
this issue
Dec 18, 2024
refactored the code to run setMatchingText only when the object change instead of on every render fixes: #7064
mihai-albu-sage
added a commit
that referenced
this issue
Dec 19, 2024
refactored the code to run setMatchingText only when the object change instead of on every render fixes: #7064
14 tasks
mihai-albu-sage
added a commit
that referenced
this issue
Dec 20, 2024
refactored the code to run setMatchingText only when the object change instead of on every render fixes: #7064
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
I have linked a FilterableSelect to react form.
The particularity here is that the value of the options is an object.
Filtering is working but ...
If you select “Black”, then put the cursor at the end of the text, you won’t be able to remove the letters with backspace.
If values are string, it is working fine.
Reproduction
https://stackblitz.com/edit/parsium-carbon-starter-aa9gdv?file=package.json,src%2FApp.tsx
Steps to reproduce
No response
JIRA ticket numbers (Sage only)
No response
Suggested solution
No response
Carbon version
144.2.2
Design tokens version
4.22.0
Relevant browsers
Chrome
Relevant OSs
MacOS
Additional context
We have the same problem in CM using Formik. So it seems not to be a react form issue.
What i saw is that for each backspace in the “string version”, i have a onChange then a onFitlerChange.
But i only have the onChange for the “object version”.
Confidentiality
The text was updated successfully, but these errors were encountered: