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

3.8.2版本的useFusionTable手动模式调用run,手动传参被默认参数覆盖 #2693

Open
tkgkn opened this issue Dec 5, 2024 · 1 comment

Comments

@tkgkn
Copy link

tkgkn commented Dec 5, 2024

const model = useFusionTable(xxx, {manual: true})

mode.run({a: 1, b: 2, c: 3})

a b c都被丢失了。

@tkgkn
Copy link
Author

tkgkn commented Dec 5, 2024

应该不是丢参数,而是manual模式有问题。看了下3.8.2版本有关的代码改动,去掉了manual的判断,会导致自动发起请求。另外我的业务场景是这么使用的。

  const batchModel = useFusionTable(wrapGetTaskDetail, {
    manual: true,
    debounceWait: 100,
  });

我手动调用了batchModel.run(someBizParams)后,100毫秒后自动又发起了请求,后面发起的请求又把参数重新赋值到了allFormDataRef.current = defaultParams?.[1] || {};上,看代码而且是默认参数,导致覆盖了我业务参数。

@tkgkn tkgkn changed the title 3.8.2版本的useFusionTable手动模式调用run,参数没有传递 3.8.2版本的useFusionTable手动模式调用run,手动传参被默认参数覆盖 Dec 5, 2024
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