From 8792d101b891b9f9f299706771a6a295982b4748 Mon Sep 17 00:00:00 2001 From: mertmit Date: Tue, 28 May 2024 02:48:20 +0300 Subject: [PATCH] fix: proper edit for bigint Signed-off-by: mertmit --- packages/nc-gui/components/cell/Integer.vue | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/nc-gui/components/cell/Integer.vue b/packages/nc-gui/components/cell/Integer.vue index 7fd497191e..06da601e07 100644 --- a/packages/nc-gui/components/cell/Integer.vue +++ b/packages/nc-gui/components/cell/Integer.vue @@ -67,7 +67,12 @@ const vModel = computed({ }, }) -const inputType = computed(() => (isForm.value && !isEditColumn.value ? 'text' : 'number')) +const inputType = computed(() => + (vModel.value && (typeof vModel.value === 'string' ? +vModel.value : vModel.value) > Number.MAX_SAFE_INTEGER) || + (isForm.value && !isEditColumn.value) + ? 'text' + : 'number', +) const focus: VNodeRef = (el) => !isExpandedFormOpen.value && !isEditColumn.value && !isForm.value && (el as HTMLInputElement)?.focus()