Reproduction link
Steps to reproduce
Hover Select behaves strangely after filling in the value or after resetting it. The select arrow disappears, the feedback disappears. There are 2 ways to recreate this. In the AntD version, e.g. 5.3.0, it behaved correctly ( https://codesandbox.io/p/sandbox/select-hasfeedback-weird-behaviour-5-3-0-n9rqpj )
Additionally, when we select a value and reset it using setFieldValue or setFieldsValue, the feedback does not reset and lights up green even though the field is required (is it expected? How can I reset feedback after clearing the value?)
Option 1:
- Open sandbox reproduction link
- Hover over Select and the border / select-arrow displays correctly
- Select a value, the green feedback lights up, but when hovered over it disappears and only the clear option is shown (select-arrow also disappear)
- Clear the value and hover over Select again. When hovered, the field looks like a regular text field, not a selection list.
Option 2:
- Open sandbox reproduction link
- Hover over Select and select arrow appears.
- Click on select and open selection list
- Close list and hover again over Select (this time select arrow does not appear which is weird)
What is expected?
Select arrow should always be visible (down or up) when hovering over Select.
Reseting select value with feedback icon does not reset feedback status?
How can I reset feedback status if this behaviour is expected?
What is actually happening?
Select arrow / feedback icon disappears after hovering.
| Environment | Info |
| ------------ | ------------ |
| antd | 5.14.1 |
| React | 18.2.0 |
| System | Windows |
| Browser | Chrome/Edge chromium/Firefox |
3条答案
按热度按时间nue99wik1#
Any updates?
m528fe3b2#
I think this behavior seems normal, the bug was in version 5.3.0
For UX it is better to leave one active element, the ability to clear the field
otherwise there will be a problem as in the screenshot
jljoyd4f3#
Yes, in version 5.15.3 the behavior is correct