Skip to content

Conversation

@sagardspeed2
Copy link
Contributor

@sagardspeed2 sagardspeed2 commented Jan 16, 2025

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

  • I have performed a self-review of my code
  • I have added tests
  • I have added a changeset pnpm changeset add
  • I have added example usage in the kitchen sink app

@sagardspeed2 sagardspeed2 requested review from anserwaseem, evshi and justEhmadSaeed and removed request for evshi January 16, 2025 06:52
@sagardspeed2 sagardspeed2 self-assigned this Jan 16, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Jan 16, 2025

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-bot
Copy link

changeset-bot bot commented Jan 16, 2025

🦋 Changeset detected

Latest commit: e5eaebf

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 4 packages
Name Type
@ensembleui/react-runtime Patch
@ensembleui/react-kitchen-sink Patch
@ensembleui/react-preview Patch
@ensembleui/react-starter Patch

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


useDebounce(
() => {
if (onSearchAction?.callback && !isEmpty(searchValue)) {
Copy link
Member

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?

Copy link
Contributor

@evshi evshi left a 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

Comment on lines +541 to 552
// 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();
});
});
Copy link
Contributor

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants