feat(Select): add creatable and new features#2820
Conversation
|
PatternFly-React preview: https://patternfly-react-pr-2820.surge.sh |
025fa19 to
a8a0ab4
Compare
mcarrano
left a comment
There was a problem hiding this comment.
This is looking good, But a couple of questions:
-
When I add a new item to the list, looks like it's always added at the end. Is this always the case? If we have an alphabetically list, shouldn't the new item be inserted where it belongs? So if I add Connecticut, why does it get added to the end rather than after Alabama?
-
Shouldn't these options also apply to the multi-value type ahead select?
|
@mcarrano Both new and creatable should work for multi-type ahead select as well. I will add the checkbox toggles to that example! |
dlabaj
left a comment
There was a problem hiding this comment.
A few comments. Otherwise looks good. Thanks.
packages/patternfly-4/react-core/src/components/Select/Select.md
Outdated
Show resolved
Hide resolved
packages/patternfly-4/react-core/src/components/Select/Select.test.tsx
Outdated
Show resolved
Hide resolved
...es/patternfly-4/react-integration/demo-app-ts/src/components/demos/SelectDemo/SelectDemo.tsx
Show resolved
Hide resolved
...es/patternfly-4/react-integration/demo-app-ts/src/components/demos/SelectDemo/SelectDemo.tsx
Outdated
Show resolved
Hide resolved
d728c12 to
109521f
Compare
|
When the menu expands up, should the arrow rotate @mcarrano |
|
@jschuler autocomplete is set to off for all selects, so I'm unsure why it would be showing up. Which browser are you using? @christiemolloy Re: multi-typeahead, it looks like you are selecting Alabama twice, first which selects it and second which unselects it and removes it form the chip group. |
|
@kmcfaul strange, Chrome 76.0.3809.132. If no one else sees this then it might be something on my end |
|
That's my version of Chrome and I'm not seeing the autocomplete on the surge. Very odd. Anyone else seeing it? |
|
@kmcfaul do you have autofill enabled? |
|
I do have it enabled. |
|
Might have to wrap in form tags as this comment suggests https://gist.github.com/niksumeiko/360164708c3b326bd1c8#gistcomment-3004386 |
|
That seems less than ideal, html structure wise. Will try it out though, hopefully shouldn't change anything visually. |
|
@kmcfaul ok, i don't recall seeing autocomplete before, i wonder why it's showing now |
109521f to
bbdaad9
Compare
|
Regarding your question @christiemolloy:
I don't feel strongly about this, but I think we should just be consistent with what we do for other dropdown or select instances. |
|
I think it makes sense to have the arrow icon change to an upward direction on direction toggle. This is more of a quick bugfix than related to this particular PR though. I can put up a different PR for it. |
|
@kmcfaul wrapping inputs with form elements fixed the auto complete issue for me |




What: Adds the creatable and new use cases to select via
isCreatableandonCreateOptionproperties. Specifically applies to typeahead variants.Refer to issue: #2665