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

ProFormSelect 在 searchable 和 request 都设置的情况下,不能正确设置默认值 #11197

Open
ft20082 opened this issue Mar 27, 2024 · 0 comments

Comments

@ft20082
Copy link

ft20082 commented Mar 27, 2024

ProFormSelect 在属性只有 options 且类型一致的情况下,能够正常设置默认值

但是如果是 searchable 和 request 的情况下,不能够设置默认值,也没有触发请求。

一般情况下,服务端返回的是 label 和 value,

一般的需求是输入 label 搜索值,设置 value ,且当前 ProFormSelect 的 name 值 一般也会 value 的属性,而不是对应 value 值。
例如:数据库字段为 type 作为 ProFormSelect 的 name , 但是搜索的值一般是中文,保存到服务段的也是 type 字段。这就导致,如果设置 type 的值,就不是要显示的值

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

1 participant