You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
我有个自定义组件,维护一个 [{name: "1"}] 这样的数据
然后内部用Immer对数据进行操作,这样会导出一个不可变的数据给Form
而当我 formApi.setValue('list[0].name','x'); 的时候就会有问题
要如何处理这种情况?
我现在临时的做法是,自定义组件onChange的时候通过 JSON 解析和序列化了一下
但是这种做法在列表很大或者dom很多的情况下就会有点慢了
当然还有一种办法就是不用immer,因为确实好像对不可变数据没啥要求
Beta Was this translation helpful? Give feedback.
All reactions