From 578961e5c9ed9799d18503c61a17254070f93cdf Mon Sep 17 00:00:00 2001 From: Wing-Kam Wong Date: Fri, 10 Feb 2023 16:29:19 +0800 Subject: [PATCH] feat(nc-gui): use MultiSelect component for SingleSelect columns for anyof / nanyof filters --- .../nc-gui/components/smartsheet/toolbar/FilterInput.vue | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/nc-gui/components/smartsheet/toolbar/FilterInput.vue b/packages/nc-gui/components/smartsheet/toolbar/FilterInput.vue index cf55b3096c..32c030d613 100644 --- a/packages/nc-gui/components/smartsheet/toolbar/FilterInput.vue +++ b/packages/nc-gui/components/smartsheet/toolbar/FilterInput.vue @@ -26,7 +26,6 @@ import { useProject, } from '#imports' import type { Filter } from '~/lib' -import SingleSelect from '~/components/cell/SingleSelect.vue' import MultiSelect from '~/components/cell/MultiSelect.vue' import DatePicker from '~/components/cell/DatePicker.vue' import YearPicker from '~/components/cell/YearPicker.vue' @@ -51,13 +50,17 @@ interface Emits { } const props = defineProps() + const emit = defineEmits() const column = toRef(props, 'column') + const editEnabled = ref(true) provide(ColumnInj, column) + provide(EditModeInj, readonly(editEnabled)) + provide(ReadonlyInj, ref(false)) const checkTypeFunctions = { @@ -109,7 +112,8 @@ const booleanOptions = [ ] const componentMap: Partial> = { - isSingleSelect: SingleSelect, + // use MultiSelect for SingleSelect columns for anyof / nanyof filters + isSingleSelect: MultiSelect, isMultiSelect: MultiSelect, isDate: DatePicker, isYear: YearPicker,