Browse Source

feat(nc-gui): use MultiSelect for SingleSelect columns for anyof / nanyof filters

pull/5106/head
Wing-Kam Wong 2 years ago
parent
commit
42b38ec843
  1. 4
      packages/nc-gui/components/smartsheet/toolbar/FilterInput.vue

4
packages/nc-gui/components/smartsheet/toolbar/FilterInput.vue

@ -112,7 +112,8 @@ const booleanOptions = [
{ value: null, label: 'unset' },
]
const componentMap: Partial<Record<FilterType, any>> = {
const componentMap: Partial<Record<FilterType, any>> = $computed(() => {
return {
// use MultiSelect for SingleSelect columns for anyof / nanyof filters
isSingleSelect: ['anyof', 'nanyof'].includes(props.filter.comparison_op) ? MultiSelect : SingleSelect,
isMultiSelect: MultiSelect,
@ -128,6 +129,7 @@ const componentMap: Partial<Record<FilterType, any>> = {
isInt: Integer,
isFloat: Float,
}
})
const filterType = $computed(() => {
return Object.keys(componentMap).find((key) => checkType(key as FilterType))

Loading…
Cancel
Save