Skip to content

Fix DataTableColumns search filter #6881

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

Merged
merged 1 commit into from
Jul 13, 2023
Merged

Fix DataTableColumns search filter #6881

merged 1 commit into from
Jul 13, 2023

Conversation

kyuohoh
Copy link
Contributor

@kyuohoh kyuohoh commented Jul 12, 2023

What does this PR do?

This PR has a fix for the DataTableColumns filter functionality where it will look at the label first to match the searchTerm.
Initially, it was looking at the property and this was causing the search filter to improperly filter the options.

Issue example: https://f4phv2.sse.codesandbox.io/datatable

What testing has been done on this PR?

  • Storybook

How should this be manually tested?

Do Jest tests follow these best practices?

  • screen is used for querying.
  • The correct query is used. (Refer to this list of queries)
  • userEvent is used in place of fireEvent.
  • asFragment() is used for snapshot testing.

Any background context you want to provide?

What are the relevant issues?

Screenshots (if appropriate)

Do the grommet docs need to be updated?

Should this PR be mentioned in the release notes?

Is this change backwards compatible or is it a breaking change?

Copy link
Collaborator

@MikeKingdom MikeKingdom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great. I tested it locally with the codesandbox example and a few of our storybook examples.

Copy link
Collaborator

@jcfilben jcfilben left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks for contributing!

@jcfilben jcfilben merged commit 5d14656 into grommet:master Jul 13, 2023
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