diff --git a/src/features/forms/components/inputs/RepeatInput.vue b/src/features/forms/components/inputs/RepeatInput.vue index eafaa2985aa1a8f164e2fe2070a3ed2e87f1ea05..6dd1c70b55e89b994cc84b87f427156fcede3d93 100644 --- a/src/features/forms/components/inputs/RepeatInput.vue +++ b/src/features/forms/components/inputs/RepeatInput.vue @@ -20,7 +20,7 @@ const emit = defineEmits<{ type: string, id: string, index: number, - value: { oldValue: string, newValue: string } + value: { oldValue: string | boolean, newValue: string | boolean } }) }>(); @@ -93,6 +93,16 @@ function onCheck(value, id: string, index: number) { id, index }); + + emit('add-undo-action', { + type: 'change', + value: { + oldValue: !value, + newValue: value + }, + id, + index + }); } function onClick(index: number, action: SideAction | null) { @@ -104,7 +114,7 @@ function onClick(index: number, action: SideAction | null) { } } -function onAddUndoAction(value: { oldValue: string, newValue: string }, id: string, index: number) { +function onAddUndoAction(value: { oldValue: string | boolean, newValue: string | boolean }, id: string, index: number) { emit('add-undo-action', { type: 'change', value,