Skip to content
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

fix(select): error onclick showAction 'focus' #2229

Closed
wants to merge 4 commits into from

Conversation

rathga
Copy link

@rathga rathga commented May 12, 2020

This is a ...

  • New feature
  • Bug fix
  • Site / document update
  • Component style update
  • TypeScript definition update
  • Refactoring
  • Code style optimization
  • Branch merge
  • Other (about what?)

What's the background?

  1. Describe the source of requirement.

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.

  1. Resolve what problem.

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.

  1. Related issue link.

Fixes #2325

(In react project: ant-design/ant-design#14503 - already fixed)

Self Check before Merge

  • Doc is updated/provided or not needed
  • Demo is updated/provided or not needed
  • TypeScript definition is updated/provided or not needed
  • Changelog is provided or not needed

@tangjinzhou
Copy link
Member

you can pr to branch feat-vue3

@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 28, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Select opens and closes rapidly upon click with showAction focus enabled
2 participants