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

feat(Search input): Added a prop to display utilities #9729

Merged
merged 3 commits into from
Oct 17, 2023

Conversation

tlabaj
Copy link
Contributor

@tlabaj tlabaj commented Oct 9, 2023

What: Closes #9540

@tlabaj tlabaj changed the title Searchinput feat(Search input): Added a prop to display utilities Oct 9, 2023
@patternfly-build
Copy link
Contributor

patternfly-build commented Oct 9, 2023

@@ -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 */
Copy link
Contributor

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:

Suggested change
/** 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)

Copy link
Contributor Author

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".

@kmcfaul kmcfaul merged commit 107c7a6 into patternfly:main Oct 17, 2023
10 checks passed
@patternfly-build
Copy link
Contributor

Your changes have been released in:

  • @patternfly/react-code-editor@5.2.0-prerelease.11
  • @patternfly/react-core@5.2.0-prerelease.11
  • @patternfly/react-docs@6.2.0-prerelease.11
  • demo-app-ts@5.1.1-prerelease.34
  • @patternfly/react-table@5.2.0-prerelease.11

Thanks for your contribution! 🎉

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.

Enable TextInputGroupUtilities in SearchInput even with no value
4 participants