-
Notifications
You must be signed in to change notification settings - Fork 7.2k
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
ApiSelect 重复请求问题 #2830
Comments
有解决吗? |
没有,如果要使用ApiSelect避免使用该属性,我是使用Select另外封装了组件 |
解决方案有两种: 2、传入回调函数,让表单赋值在回调事件中去做 const [registerForm, { updateSchema }] = useForm({ export const formSchema = (selectChange: Fn): FormSchema[] => { 如果你是其中一个select依赖另一个ApiSelect时,可以使用以下方式解决 |
这PR #3005 已修复 |
修复的是ApiTreeSelect,ApiSelect还是存在这个问题 |
抱歉 看岔眼了 |
您好,我现在还碰到了另外的问题,就是table搜索时,field的字段会自动添加到formModel里面,field优先级更高,我在onchange里面修改该字段值无效。但是有的时候我并不需要,比如我需要对onChange返回的数据进行处理。这种情况我该如何处理 |
没有复现出你说的重复请求 |
另开个issue, 提供好你的测试代码 |
最近几个月改动有些多,记不清了, 你试着拉取下最新的代码测试下 |
好滴 我闲了定位这个错误 |
那就跟这个 #2738 反馈的问题一致 |
@masicheng #3107 这个PR应该解决了,兄弟你再测试下 |
重复请求的问题解决了,但是又有了新的问题,onChange事件会触发两次 |
@masicheng 0f2c2ea |
描述 Bug
componentProps 使用 formModel时,会导致多次请求
复现 Bug
watchEffect(() => {
props.immediate && !props.alwaysLoad && fetch(); //多次触发此方法
});
componentProps: ({ formModel }) => {
return {
};
},
系统信息
The text was updated successfully, but these errors were encountered: