lowcode-engine icon indicating copy to clipboard operation
lowcode-engine copied to clipboard

project的api importSchema会导致历史被重置

Open ljmCoder opened this issue 3 years ago • 1 comments

源码插件按钮点击保存之后, 会调用project.importSchema。 importSchema会导致历史被重置, 即保存点击动作之前的历史都无法通过历史回退按钮回退。

image

ljmCoder avatar Oct 11 '22 07:10 ljmCoder

@liujuping 引擎侧推荐用什么方法修改 schema 能保留历史记录的?

alvarto avatar Jan 09 '23 07:01 alvarto

改Schema还是比较高频的行为,现在似乎只有project.importSchema这种方案.

但是会导致触发过多的project.onChangeDocument

eightHundreds avatar Jun 26 '23 11:06 eightHundreds

当论这个issue, 可能用lowcodeProjectRef.current.getCurrentDocument()?.importSchema 可以解决

eightHundreds avatar Jun 26 '23 12:06 eightHundreds