diff --git a/packages/nc-gui-v2/components/cell/Checkbox.vue b/packages/nc-gui-v2/components/cell/Checkbox.vue index f24d797de5..61f27443a7 100644 --- a/packages/nc-gui-v2/components/cell/Checkbox.vue +++ b/packages/nc-gui-v2/components/cell/Checkbox.vue @@ -14,11 +14,15 @@ interface Emits { const props = defineProps() const emits = defineEmits() -const vModel = $(useVModel(props, 'modelValue', emits)) + +let vModel = $(useVModel(props, 'modelValue', emits)) const column = inject(ColumnInj) + const isForm = inject(IsFormInj) +const editEnabled = inject(ReadonlyInj) + const checkboxMeta = $computed(() => { return { icon: { @@ -29,11 +33,17 @@ const checkboxMeta = $computed(() => { ...(column?.value?.meta || {}), } }) + +function onClick() { + if (editEnabled) { + vModel = !vModel + } +}