ant-design: Using ShowAction to open dropdown on focus breaks click behavior
- I have searched the issues of this repository and believe that this is not a duplicate.
Reproduction link
Steps to reproduce
1: Make sure you’re not already focused on the Select
component
2: Click the expand arrow (make sure you click the the down arrow icon. If it doesn’t happen, de-select component and try again)
What is expected?
The select would expand and show the options
What is actually happening?
It briefly opens and then immediately closes again.
Environment | Info |
---|---|
antd | 3.12.1 |
React | 16.7.0 |
System | OSX |
Browser | Chrome 71 |
Example is setup with a common use case of wanting the select to open when tabbed into. It uses the underlying rc-select showAction
which is mentioned in #6873. You can see this in action by focusing on the input and then hitting tab.
However, adding this prop causes issues with the select opening up properly when clicking on it.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 17 (15 by maintainers)
Any update on this one? How to get around this issue while having both actions
focus
andclick
?Since
showAction
is internal prop fromrc-select
. We don’t pop to the antd doc. If you use this prop, you should also add related css to handle this: https://codesandbox.io/s/3vqk45o9q6When can we expect a fix of this issue?
Here’s a GIF of it happening in chrome for OSX… It also happens in my safari.
@ztplz the whole point of doing this in the first place is to be able to open the drop down on focus! #6873 was closed with
showAction={['focus']}
as an acceptable solution.This is a must have feature for working with a
Select
(so maybe #6873 should be reopened)