patternfly-react icon indicating copy to clipboard operation
patternfly-react copied to clipboard

feat(DualListSelector, SearchInput): use SearchInput in DLS, add type prop to SearchInput

Open kmcfaul opened this issue 3 years ago • 4 comments

What: Closes #7977

Updates DualListSelector to internally build a SearchInput. Adds type prop to SearchInput to match DualListSelector's initial input type.

kmcfaul avatar Sep 22 '22 15:09 kmcfaul

Preview: https://patternfly-react-pr-8040.surge.sh

A11y report: https://patternfly-react-pr-8040-a11y.surge.sh

patternfly-build avatar Sep 22 '22 16:09 patternfly-build

I can sneak an update for that in. The default behavior will call onChange with an empty string and may be overridden with onSearchInputClear.

Though I'm a little confused about how some of these search callbacks are meant to work, because several are hidden from the props documentation with @hide, and it doesn't look like onSearch (which is visible) is used anywhere. Is the new prop I added onSearchInputClear actually necessary if a user is meant to ignore all these props and use searchInput instead for composable dual list selectors? @nicolethoen

kmcfaul avatar Sep 23 '22 18:09 kmcfaul

This looks great! The only thing I'd suggest is adding an empty state if the search doesn't match any of the options? I realize that is an oversight from when I designed this. But maybe just a small or xs empty state using the text and icon here: https://www.patternfly.org/v4/components/empty-state#no-match-found

mmenestr avatar Sep 23 '22 20:09 mmenestr

This looks great! The only thing I'd suggest is adding an empty state if the search doesn't match any of the options? I realize that is an oversight from when I designed this. But maybe just a small or xs empty state using the text and icon here: https://www.patternfly.org/v4/components/empty-state#no-match-found

That may be a pretty significant enhancement to the Dual list selector at this point. I am in the process of a dual list selector re-work and if you open an issue to incorporate an empty state, I can include it with the re-work

nicolethoen avatar Sep 23 '22 20:09 nicolethoen

@nicolethoen sounds good, just opened this: https://github.com/patternfly/patternfly-react/issues/8080

mmenestr avatar Sep 26 '22 15:09 mmenestr

Rebased conflict

kmcfaul avatar Sep 30 '22 15:09 kmcfaul