fix(select): error onclick showAction 'focus' #2229
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a ...
What's the background?
When tabbing to (as opposed to clicking on) a select in default/single mode, it does not display the dropdown or let you enter input in the case of show-search.
The bug is documented for the react project here: ant-design/ant-design#14503
In the react project this can be fixed by adding the prop:
:show-action="['focus','click']"
to the select. This also works in the vue project but it causes a side effect in that, with the prop in place, clicking on the select now instantly closes it.The side effect bug can be fixed by deleting
selectionRefClick()
in Select.jsx. It is not clear what this method is for as the select appears to work just fine without it, and it is the cause of the side effect.The show-action prop is currently an undocumented feature (both in the react and vue projects), but probably should be documented or the behaviour simply made the default in a future update.
Fixes #2325
(In react project: ant-design/ant-design#14503 - already fixed)
Self Check before Merge