Open zj131711 opened 3 weeks ago
document.history 用来实现 undo/redo 功能,当schema发生变更时可以记录到 history 的 records 里面,并且state改变时会抛出 onChangeState 事件,但只有在设置循环渲染的数据后会出现不触发 onChangeState 事件,undo按钮也无效。
Steps to reproduce the behavior: / 详细复现步骤: 以下是简化场景的重新步骤
"loopArgs": [ null, null ]
调试后发现,与其他setter的变动相比较,虽然同样触发了 AliLowCodeEngine/editor-skeleton/src/components/settings/settings-pane.tsx 的 field.setValue(value, true);,但是这种情况下不会进入下一步 AliLowCodeEngine/designer/src/document/history.ts 的 MobX reaction 的监听函数,所以不会触发状态改变。但还查不到为什么。
AliLowCodeEngine/editor-skeleton/src/components/settings/settings-pane.tsx
field.setValue(value, true);
AliLowCodeEngine/designer/src/document/history.ts
Sceenshots for further information. (If applicable.) / 一些有用的截图将会帮助我们更好的明确以及定位问题
(this information can be collected via the manual plugin / 版本信息可通过低代码用户手册插件收集)
Any other context of the problem here. / 可以追加更多的额外信息,帮助定位问题
Describe the bug (required) / 详细描述 bug(必填)
document.history 用来实现 undo/redo 功能,当schema发生变更时可以记录到 history 的 records 里面,并且state改变时会抛出 onChangeState 事件,但只有在设置循环渲染的数据后会出现不触发 onChangeState 事件,undo按钮也无效。
To Reproduce (required) / 如何复现 bug?(必填,非常重要)
Steps to reproduce the behavior: / 详细复现步骤: 以下是简化场景的重新步骤
"loopArgs": [ null, null ]
,撤销按钮会亮起,直接保存(或者切回其他tab修改之后保存也一样的)调试后发现,与其他setter的变动相比较,虽然同样触发了
AliLowCodeEngine/editor-skeleton/src/components/settings/settings-pane.tsx
的field.setValue(value, true);
,但是这种情况下不会进入下一步AliLowCodeEngine/designer/src/document/history.ts
的 MobX reaction 的监听函数,所以不会触发状态改变。但还查不到为什么。Screenshots (optional) / bug 截图(可选)
Sceenshots for further information. (If applicable.) / 一些有用的截图将会帮助我们更好的明确以及定位问题
Environments (please complete the following information) (required): / 请提供如下信息(必填)
Additional context (optional) / 更多额外信息(可选)
Any other context of the problem here. / 可以追加更多的额外信息,帮助定位问题