-
Notifications
You must be signed in to change notification settings - Fork 22
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
Clear button in searchInput #250
Conversation
@garrett the width of the input is fixed now. I changed the components. I hope that's a better one) |
Oh, we usually re-use the same PR for the same branch so the conversation isn't fragmented and gets lost. That's done with a force push, such as Two problems:
My dev console says:
|
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.
(See above; I forgot to make it a review instead of a normal comment.)
Sorry I can't test it completely due to the fsinfo commit. How can I make the [x] button appear without changing the width of the input? |
/> | ||
<TextInputGroupUtilities> | ||
<Button | ||
variant="plain" onClick={_ => setCurrentFilter("")} |
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.
_
is already bound to cockpit.gettext
. Just pass setCurrentFilter("").
icon={<SearchIcon />} value={currentFilter} | ||
onChange={onFilterChange} placeholder={_("Filter directory")} | ||
/> | ||
<TextInputGroupUtilities> |
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.
This needs to be behind some conditional like currentFilter !== ""
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.
Yes but that also will increase the width
Superseeded by #465 |
closes #236
replicate of #240 closed it by accident because of some conflicts