-
Notifications
You must be signed in to change notification settings - Fork 1k
updateOn parameter for DataSearch #7029
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
Conversation
</Grommet>, | ||
); | ||
|
||
expect(container.firstChild).toMatchSnapshot(); |
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 think the snapshot test isn't really capturing the behavior we actually want to test here. If we could write the test so that it tests typing something into search and then pressing the enter key I think that would be ideal
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've updated the test case and it is failing, even after providing a filter value and doing submit/ simulating enter. The snapshot still has other values.
But it is working as expected in storybook.
Can you please help me on this ?
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've tried userEvent which is timing out.
Just an update on this PR: I think the |
That sounds like a plan! |
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.
@anoopadvaitha With the changes to remove Form from DataSearch I created an newer implementation of this feature in #7110
Superseded by #7110 |
Currently DataSearch filters data as soon as we start typing (onchange). This becomes challenge in scenarios where the data is fetched from API.
What does this PR do?
The PR provides updateOn parameter which is passed to DataForm so that developer can leverage to either use change or submit.
Where should the reviewer start?
\src\js\components\DataSearch\DataSearch.js
What testing has been done on this PR?
Tested when no value is provided for DataSearch and when submit is provided and works in both scenarios.
How should this be manually tested?
Do Jest tests follow these best practices?
screen
is used for querying.asFragment()
is used for snapshot testing.Any background context you want to provide?
What are the relevant issues?
#7024
Screenshots (if appropriate)
Do the grommet docs need to be updated?
Yes, will be raising the PR on that
Should this PR be mentioned in the release notes?
No.
Is this change backwards compatible or is it a breaking change?
Yes