feat: add option to allow clearing selection in dropdown#1040
feat: add option to allow clearing selection in dropdown#1040justEhmadSaeed merged 2 commits intomainfrom
Conversation
🦋 Changeset detectedLatest commit: 7c05e82 The changes in this PR will be included in the next version bump. This PR includes changesets to release 4 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Visit the preview URL for this PR (updated for commit 7c05e82): https://react-kitchen-sink-dev--pr1040-1039-allow-clear-opt-3lhdjsvc.web.app (expires Thu, 20 Feb 2025 17:48:50 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: 6267897ade2ba783b6db70a53a60fc3946d625e9 |
| <div ref={rootRef} style={{ flex: 1, ...formItemStyles }}> | ||
| <EnsembleFormItem values={values}> | ||
| <Select | ||
| allowClear={values?.allowClear || false} |
There was a problem hiding this comment.
Nit: could just use double bang !!
There was a problem hiding this comment.
@evshi eslint doesn't allow me to do that. It suggests using Boolean as its alternative
There was a problem hiding this comment.
@evshi had to change it to use ?? to make it true by default
| <div ref={rootRef} style={{ flex: 1, ...formItemStyles }}> | ||
| <EnsembleFormItem values={values}> | ||
| <Select | ||
| allowClear={values?.allowClear || false} |
There was a problem hiding this comment.
can we keep it to true by default conforming with behavior of other such widgets like MultiSelect and Search
Describe your changes
Screenshots [Optional]
Issue ticket number and link
Closes #1039
Checklist before requesting a review
pnpm changeset add