-
Notifications
You must be signed in to change notification settings - Fork 2
fix: allow reset options on clear search #991
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
base: main
Are you sure you want to change the base?
Conversation
Visit the preview URL for this PR (updated for commit 2bef4c4): https://react-kitchen-sink-dev--pr991-fix-update-multisele-dthds9wk.web.app (expires Fri, 24 Jan 2025 14:43:48 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: 6267897ade2ba783b6db70a53a60fc3946d625e9 |
🦋 Changeset detectedLatest commit: e5eaebf 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 |
@@ -119,7 +119,7 @@ export const Search: React.FC<SearchProps> = ({ | |||
|
|||
useDebounce( | |||
() => { | |||
if (onSearchAction?.callback && !isEmpty(searchValue)) { |
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.
@sagardspeed2, didn't we add this for a reason previously? here: https://github.com/EnsembleUI/ensemble-react/pull/909/files#diff-c40bba994aece7636430625fad970ec08c0334f7edc12464e796ea3375086432R118
Could you please confirm that removing this won't cause any regressions?
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.
Needs tests to avoid regressions like @sharjeelyunus is mentioning
// clear search value to show all options | ||
userEvent.clear(document.querySelector("input") as HTMLElement); | ||
|
||
// Wait for the combobox to reflect the selected values | ||
await waitFor(() => { | ||
expect(screen.getByText("Option 4", { selector })).toBeVisible(); | ||
expect(screen.queryByText("Option 1", { selector })).toBeVisible(); | ||
expect(screen.queryByText("Option 2", { selector })).toBeVisible(); | ||
expect(screen.queryByText("Option 3", { selector })).toBeVisible(); | ||
expect(screen.queryByText("Option 44", { selector })).toBeVisible(); | ||
}); | ||
}); |
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.
Shouldn't this not be visible? Can we make this into a separate test?
Describe your changes
Allow reset options on clear search in multiselect and search
Screenshots [Optional]
Issue ticket number and link
Closes #
Checklist before requesting a review
pnpm changeset add