diff --git a/src/components/VnTable/VnColumn.vue b/src/components/VnTable/VnColumn.vue index aeccdb2d6..35309d586 100644 --- a/src/components/VnTable/VnColumn.vue +++ b/src/components/VnTable/VnColumn.vue @@ -5,6 +5,7 @@ import { dashIfEmpty } from 'src/filters'; /* basic input */ import VnSelect from 'components/common/VnSelect.vue'; +import VnSelectCache from 'components/common/VnSelectCache.vue'; import VnInput from 'components/common/VnInput.vue'; import VnInputDate from 'components/common/VnInputDate.vue'; import VnComponent from 'components/common/VnComponent.vue'; @@ -41,6 +42,17 @@ const $props = defineProps({ }, }); +const defaultSelect = { + attrs: { + row: $props.row, + disable: !$props.isEditable, + class: 'fit', + }, + forceAttrs: { + label: $props.showLabel && $props.column.label, + }, +}; + const defaultComponents = { input: { component: markRaw(VnInput), @@ -94,14 +106,12 @@ const defaultComponents = { }, }, select: { + component: markRaw(VnSelectCache), + ...defaultSelect, + }, + rawSelect: { component: markRaw(VnSelect), - attrs: { - disable: !$props.isEditable, - class: 'fit', - }, - forceAttrs: { - label: $props.showLabel && $props.column.label, - }, + ...defaultSelect, }, icon: { component: markRaw(QIcon), diff --git a/src/components/VnTable/VnFilter.vue b/src/components/VnTable/VnFilter.vue index b0b7c4756..15e1cc947 100644 --- a/src/components/VnTable/VnFilter.vue +++ b/src/components/VnTable/VnFilter.vue @@ -138,7 +138,12 @@ const showFilter = computed( );