Skip to content
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

Add isQueryValid prop for RunQueryButtons #3

Merged
merged 2 commits into from
Nov 30, 2022

Conversation

kevinwcyu
Copy link
Collaborator

Adds a prop isQueryValid that allows the parent component to pass in a function that RunQueryButtons can use to determine whether a query is valid. If a query is invalid, then the Run button will be disabled.

Screenshots of its usage in Redshift query editor
Run button is disabled when query is empty
Screen Shot 2022-11-30 at 2 17 32 PM

Run button is enabled when query is NOT empty
Screen Shot 2022-11-30 at 2 17 36 PM

Copy link
Member

@sarahzinger sarahzinger left a comment

Choose a reason for hiding this comment

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

might be nice to add a test but sounds good!

@kevinwcyu kevinwcyu merged commit ddbcf42 into main Nov 30, 2022
@kevinwcyu kevinwcyu deleted the kevinwcyu/disable-empty-query-runs branch November 30, 2022 22:36
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.

None yet

2 participants