ant-design 在flex布局下,处于justifyContent: 'space-between'右侧的加宽度过渡动画的< TreeSelect>组件,在下拉展开时,下拉会先在右侧展开,再移到左侧

nwsw7zdq  于 6个月前  发布在  其他
关注(0)|答案(2)|浏览(106)

Steps to reproduce

  1. 代码
<TreeSelect
  style={{
    width: expand ? '200px' : '100px',
    transition: 'width 0.4s ease-in-out',
  }}
>
  1. 点击 TreeSelect 组件

What is expected?

下拉可以跟着过渡动画效果,平滑的增加宽度

What is actually happening?

下拉会先在相对于搜索框偏右的位置展开,再移到左侧
| Environment | Info |
| ------------ | ------------ |
| antd | 5.16.2 |
| React | 18.2.0 |
| System | MacOS |
| Browser | Chrome |

相关问题