Comments (3)
You should use open
and onOpenChange
.
from ant-design.
Start a new pull request in StackBlitz Codeflow.
from ant-design.
I don't think adding an open method to Select is a good way, you can implement it yourself
const CustomSelect = React.forwardRef((props: SelectProps, ref) => {
const [open, setOpen] = React.useState(false);
const selectRef = useRef<RefSelectProps>(null);
React.useImperativeHandle(ref, () => ({
...selectRef.current,
open: () => setOpen(true),
}));
return (
<Select
{...props}
ref={selectRef}
open={open}
onDropdownVisibleChange={setOpen}
/>
);
});
from ant-design.
Related Issues (20)
- 强烈建议增加column move(列拖拽排序)功能 HOT 8
- 给多选框(Checkbox)加一个和单选框button模式相同的样式组件 HOT 5
- Dropdown doesnt support inline mode HOT 1
- form.validateFields在没有使用catch捕获错误时报错 HOT 1
- 重新设置initialState之后使用refresh刷新无法重新渲染 HOT 1
- Time range picker popup position bug HOT 1
- Input 添加addonAfter根据变量控制失去焦点问题 HOT 2
- ant table 开启 virtual后,横向怎么启动虚拟加载 HOT 6
- DatePicker 能否出个属性,支持某天特殊颜色(支持设置其他颜色)显示 HOT 1
- Alert cannot support id and ref
- Resize Icon weird rendering on mobile devices HOT 4
- DatePicker ```week``` picker and ```multiple```, only first week appear as selected in the picker with multiple selected weeks HOT 1
- Text input of Picker component with custom input prop is not selectable HOT 1
- Typography with dynamic Editable not rendering edit icon correctly HOT 2
- Drawer 多层抽屉在代码嵌套情况下,提供一种方式能使其弹出时不嵌套 HOT 2
- 增加一个Spliter组件 HOT 1
- 表格使用行合并后,rowSelection 选中后,高亮不正确 HOT 1
- 可控的筛选表格清除筛选项不生效 HOT 3
- Virtual table lazy loading/pagination HOT 1
- DatePicker doesn't focus on picker panel on tab HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ant-design.