Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

是否有这样的功能: 用户选择某个option,代码需要先check一些逻辑,等check ok之后,用户单击的选项才会选上 #967

Open
evan-xy-hu opened this issue Aug 1, 2023 · 3 comments

Comments

@evan-xy-hu
Copy link

我找了一下,组件目前没有这样的功能,是否可以加上这个新功能?

@yoyo837
Copy link
Member

yoyo837 commented Aug 2, 2023

听上去不就是受控模式么?

@evan-xy-hu evan-xy-hu changed the title 是否有这样的功能: 选择之前先check,通过之后才能选上 是否有这样的功能: 用户选择某个option,代码需要先check一些逻辑,等check ok之后,用户单击的选项才会选上 Aug 2, 2023
@evan-xy-hu
Copy link
Author

多谢回复, 我把描述写详细一些。 React的组件, 一般都是受控组件。我这里想要达到的效果,是想Select组件暴露出一个对应的接口,不是想直接操作Select组件内部的state。

@yoyo837
Copy link
Member

yoyo837 commented Aug 2, 2023

那你应该用 disabled 禁用掉, 不能选的

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants