-
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
Add clear button for Select #2015
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found it difficult to reason about a lot of the select code (not necessarily the stuff related to this change). Particularly the interplay of value
, displayValue
, committedSelectedOption
, firstSelectedOption
, selectedIndex
, and the selected
attribute of the options. Hopefully my comments still make sense.
packages/nimble-components/src/select/testing/select.pageobject.ts
Outdated
Show resolved
Hide resolved
packages/nimble-components/src/select/testing/select.pageobject.ts
Outdated
Show resolved
Hide resolved
…t.ts Co-authored-by: m-akinc <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very good, sorry took so long to get to
Pull Request
🤨 Rationale
👩💻 Implementation
Essentially just adding a button to the template of the
Select
that will either set the selectedIndex to the option that represents the placeholder, or to -1 when there is no placeholder option, resulting in empty text for the display.🧪 Testing
Added unit and Chromatic tests.
✅ Checklist