fix(nc-gui): Number based filters - restrict input for filter value to numbers

This commit is contained in:
Ramesh Mane
2025-09-04 15:47:37 +00:00
parent 69eba581dc
commit b8d590e81b
6 changed files with 16 additions and 6 deletions

View File

@@ -7,6 +7,7 @@ interface Props {
// for sqlite, when we clear a cell or empty the cell, it returns ""
// otherwise, it is null type
modelValue?: number | null | string
location?: 'cell' | 'filter'
}
interface Emits {
@@ -42,7 +43,7 @@ const vModel = computed({
},
})
const inputType = computed(() => (isForm.value && !isEditColumn.value ? 'text' : 'number'))
const inputType = computed(() => (isForm.value && !isEditColumn.value && props.location !== 'filter' ? 'text' : 'number'))
const focus: VNodeRef = (el) => {
if (!isExpandedFormOpen.value && !isEditColumn.value && !isForm.value) {