Browse Source

feat(nc-gui): use decimal input for 'pastNumberOfDays', 'nextNumberOfDays'

pull/5185/head
Wing-Kam Wong 2 years ago
parent
commit
12973aaf98
  1. 6
      packages/nc-gui/components/smartsheet/toolbar/FilterInput.vue

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

@ -117,9 +117,11 @@ const componentMap: Partial<Record<FilterType, any>> = $computed(() => {
// use MultiSelect for SingleSelect columns for anyof / nanyof filters
isSingleSelect: ['anyof', 'nanyof'].includes(props.filter.comparison_op!) ? MultiSelect : SingleSelect,
isMultiSelect: MultiSelect,
isDate: ['daysAgo', 'daysFromNow'].includes(props.filter.comparison_sub_op!) ? Decimal : DatePicker,
isDate: ['daysAgo', 'daysFromNow', 'pastNumberOfDays', 'nextNumberOfDays'].includes(props.filter.comparison_sub_op!)
? Decimal
: DatePicker,
isYear: YearPicker,
isDateTime: ['daysAgo', 'daysFromNow'].includes(props.filter.comparison_sub_op!)
isDateTime: ['daysAgo', 'daysFromNow', 'pastNumberOfDays', 'nextNumberOfDays'].includes(props.filter.comparison_sub_op!)
? Decimal
: DateTimePicker,
isTime: TimePicker,

Loading…
Cancel
Save