diff --git a/src/components/VnTable/VnFilter.vue b/src/components/VnTable/VnFilter.vue index 000683670..ba573f612 100644 --- a/src/components/VnTable/VnFilter.vue +++ b/src/components/VnTable/VnFilter.vue @@ -89,11 +89,15 @@ const components = { async function addFilter(value) { if (value && typeof value === 'object') value = model.value; - value = value === '' ? null : value; + value = value === '' ? undefined : value; let field = columnFilter.value?.name ?? $props.column.name; - const toFilter = { [field]: value }; - await arrayData.addFilter({ params: toFilter }); + let params = { [field]: value }; + if (columnFilter.value?.inWhere) { + if (columnFilter.value.prefix) field = columnFilter.value.prefix + '.' + field; + params = { filter: { where: params } }; + } + await arrayData.addFilter({ params }); } function alignRow() { diff --git a/src/components/VnTable/VnTable.vue b/src/components/VnTable/VnTable.vue index 703b24c48..044444c44 100644 --- a/src/components/VnTable/VnTable.vue +++ b/src/components/VnTable/VnTable.vue @@ -148,6 +148,7 @@ defineExpose({ :data-key="$attrs['data-key']" :search-button="true" v-model="params" + :disable-submit-event="true" >