feat: change history by supplementary node information (#25294)
Co-authored-by: alleschen <alleschen@tencent.com> Co-authored-by: crazywoola <100913391+crazywoola@users.noreply.github.com>
This commit is contained in:
@@ -9,7 +9,7 @@ export const useNote = (id: string) => {
|
||||
|
||||
const handleThemeChange = useCallback((theme: NoteTheme) => {
|
||||
handleNodeDataUpdateWithSyncDraft({ id, data: { theme } })
|
||||
saveStateToHistory(WorkflowHistoryEvent.NoteChange)
|
||||
saveStateToHistory(WorkflowHistoryEvent.NoteChange, { nodeId: id })
|
||||
}, [handleNodeDataUpdateWithSyncDraft, id, saveStateToHistory])
|
||||
|
||||
const handleEditorChange = useCallback((editorState: EditorState) => {
|
||||
@@ -21,7 +21,7 @@ export const useNote = (id: string) => {
|
||||
|
||||
const handleShowAuthorChange = useCallback((showAuthor: boolean) => {
|
||||
handleNodeDataUpdateWithSyncDraft({ id, data: { showAuthor } })
|
||||
saveStateToHistory(WorkflowHistoryEvent.NoteChange)
|
||||
saveStateToHistory(WorkflowHistoryEvent.NoteChange, { nodeId: id })
|
||||
}, [handleNodeDataUpdateWithSyncDraft, id, saveStateToHistory])
|
||||
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user