-
Notifications
You must be signed in to change notification settings - Fork 357
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
feat(Search input): Added a prop to display utilities #9729
Conversation
Preview: https://patternfly-react-pr-9729.surge.sh A11y report: https://patternfly-react-pr-9729-a11y.surge.sh |
@@ -58,6 +58,8 @@ export interface SearchInputProps extends Omit<React.HTMLProps<HTMLDivElement>, | |||
appendTo?: HTMLElement | (() => HTMLElement) | 'inline'; | |||
/** An accessible label for the search input. */ | |||
'aria-label'?: string; | |||
/** Flag to indicate utilities should be displayed */ |
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.
We could update this to something along the lines of:
/** Flag to indicate utilities should be displayed */ | |
/** Flag to indicate utilities should always be displayed. By default if this prop is undefined or false, utilities will only be displayed when the search input has a value. */ |
As is it may seem like this prop could control the rendering of utilities in general, even if other props like results
are passed in. Not sure if a different prop name would also help, but can't really think of a short one (areUtilitiesAlwaysDisplayed
feels like a bit much, alwaysDisplayUtilities
goes against what we typically do with these sort of props)
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.
Hmmm I don't know if I like the "always part". The consumer still has control and the will display it when the want. It does not technically have to be "always".
Your changes have been released in:
Thanks for your contribution! 🎉 |
What: Closes #9540