First of all thank you for adding Multi select variant of select component.
I am interested who is in charge of design of API for PF4 components. With whom can I get in touch? @rachael-phillips
There seems to be a gap between the designs and actual use cases. In order to use these in Insights apps we would probably need some modifications as the current solution does not work too well.
I have a few suggestions about about the component API.
- options format
- what if i want the option label to be different from option value? Sometimes we also need to have additional information in the options
- currently we would have to iterate over all options and search the options object based on
- i would propose something like:
- The on change would return whole object with all values.
- currently its also impossible to use this with i18n. We would have to translate the strings back to its original value in order to make it work with back end.
{ label: 'New York', value: 'NY', something: 'else' }
- options component
- what if i want to use custom component for options?
- For instance add icon to option. I know you have checkbox variant so i think its possible to allow users to add their own components. We could have a wrapper which would handle all the events and renders its children.
<SelectOptionWrapper>
{(options) => <div>{options.label} <SomeIcon /></div>}
</SelectOptionWrapper>
I think we can use react-select for inspiration. We could even just create custom styling that would restyle react select to be PF4 compatible.
link to docs: http://patternfly-react.surge.sh/patternfly-4/components/select/
Reactions are currently unavailable
First of all thank you for adding Multi select variant of select component.
I am interested who is in charge of design of API for PF4 components. With whom can I get in touch? @rachael-phillips
There seems to be a gap between the designs and actual use cases. In order to use these in Insights apps we would probably need some modifications as the current solution does not work too well.
I have a few suggestions about about the component API.
{ label: 'New York', value: 'NY', something: 'else' }I think we can use react-select for inspiration. We could even just create custom styling that would restyle react select to be PF4 compatible.
link to docs: http://patternfly-react.surge.sh/patternfly-4/components/select/