-
Notifications
You must be signed in to change notification settings - Fork 1k
Adjust empty search message styling on Select #6815
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
{options.length > 0 ? ( | ||
<OptionsContainer |
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.
EmptySearchOption is also used in SelectMultipleContainer.js in a similar way. Do you need to pull it out of the container there also?
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.
Good call, I moved the EmptySearchOption outside of the options container in SelectMultipleContainer.js
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.
It looks great and seems to work well. I'm mainly curious about if the SelectMultiple case needs to pull the EmptySearchOption out of the OptionsContainer also.
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.
Looks good!
What does this PR do?
This PR changes the 'no options found' container in Select and SelectMultiple so that it is no longer a disabled Button and is instead just Text within a Box. It also adds
theme.select.emptySearchMessage.container
andtheme.select.emptySearchMessage.text
to allow styling of the emptySearchMessage. This theme structure mirrors that oftheme.select.options
.For backwards compatibility, if no
theme.select.emptySearchMessage
object exists, we'll fall back totheme.select.option
styling.Where should the reviewer start?
src/js/components/Select/EmptySearchOption.js
What testing has been done on this PR?
For HPE theme, the following configuration could be used in the theme:
How should this be manually tested?
Do Jest tests follow these best practices?
screen
is used for querying.userEvent
is used in place offireEvent
.asFragment()
is used for snapshot testing.Any background context you want to provide?
What are the relevant issues?
Closes #6821
Screenshots (if appropriate)
Do the grommet docs need to be updated?
yes
Should this PR be mentioned in the release notes?
yes
Is this change backwards compatible or is it a breaking change?
backwards compatible