Steps to reproduce 然后点击选择器 What is expected? 原位置的select不会发生位置偏移 What is actually happening? 原位置的select发生位置偏移 1688552698687.mp4 另外测试了一下edge也会有此类问题,但如果给父盒子设置overflow:clip就不会有这个问题
class="ant-select-selection-overflow-item ant-select-selection-overflow-item-suffix" style="opacity:1" > <div class="ant-select-selection-search" style="width:0" > <input aria-activedescendant="basic_select_list_0" aria-autocomplete="list" aria-controls="basic_select_list" aria-haspopup="lis...
.ant-select-selection { max-height:51px; overflow:auto; } } } 方法很简单,有两点需要注意: 引入的 antd 组件类名没有被 CSS Modules 转化,所以被覆盖的类名.ant-select-selection必须放到:global中。 因为上一条的关系,覆盖是全局性的。为了防止对其他 Select 组件造成影响,所以需要包裹额外的 className ...
overflow: auto; } } } 1. 2. 3. 4. 5. 6. 7. 8. 9. 方法很简单,有两点需要注意: 引入的 antd 组件类名没有被 CSS Modules 转化,所以被覆盖的类名.ant-select-selection必须放到:global中。 因为上一条的关系,覆盖是全局性的。为了防止对其他 Select 组件造成影响,所以需要包裹额外的 className 限...
.ant-select-selection { max-height: 51px; overflow: auto; } } } 注意:引入的 antd 组件类名没有被 CSS Modules 转化,所以被覆盖的类名 .ant-select-selection 必须放到 :global 中。 因为上一条的关系,覆盖是全局性的。为了防止对其他 Select 组件造成影响,所以需要包裹额外的 className 限制样式的生效...
className={styles.customSelect} > {children} </Select> // TestPage.less .customSelect { :global { .ant-select-selection { max-height: 51px; overflow: auto; } } } 总结 需要分成两步 第一步额外建立样式 第二步引入 即可解决 ——— 版权声明:本文为CSDN博主「前端大歌谣」的原创文章,遵循CC ...
Please select Multiple Selection Multiple selection usage. TypeScript JavaScript import { TreeSelect } from 'antd'; import React, { useState } from 'react'; const treeData = [ { value: 'parent 1', title: 'parent 1', children: [ { value: 'parent 1-0', title: 'parent 1-0', children...
/deep/ .ant-select{ vertical-align: top; width: 100%; height: 100%; &:hover { border: 0px; border: 1px solid #4787f0; } &:focus { border: 1px solid #1890ff; box-shadow: none; } .ant-select-selection{ height: calc(100% - 1px); ...
Ant Design 4.0 的一些杂事儿 - Select 篇 引子 在日常维护过程中,会遇到千奇百怪的问题。往往定位问题的速度决定了整个 issue 需要花费的时间。今天就以一个 issue 为起点。讲讲我们在日常维护中,通过 React 官方工具快速定位的相关内容: Table 的故事 最近收到了 Table 的一个 issue: Table's onCell called...
colorPrimaryBg Light background color of primary color, usually used for weak visual level selection state. string #e6f4ff colorPrimaryBgHover The hover state color corresponding to the light background color of the primary color. string #bae0ff colorPrimaryBorder The stroke color under the main...