Browse Source

feat(nc-gui): only include numeric ui types for >, <, >= and <=

pull/5106/head
Wing-Kam Wong 2 years ago
parent
commit
a0ccee055d
  1. 10
      packages/nc-gui/utils/filterUtils.ts

10
packages/nc-gui/utils/filterUtils.ts

@ -1,5 +1,7 @@
import { UITypes } from 'nocodb-sdk' import { UITypes } from 'nocodb-sdk'
const numericUITypes = [UITypes.Duration, UITypes.Currency, UITypes.Percent, UITypes.Number, UITypes.Rating, UITypes.Rollup]
export const comparisonOpList: { export const comparisonOpList: {
text: string text: string
value: string value: string
@ -82,21 +84,21 @@ export const comparisonOpList: {
{ {
text: '>', text: '>',
value: 'gt', value: 'gt',
excludedTypes: [UITypes.Checkbox, UITypes.MultiSelect, UITypes.SingleSelect], includedTypes: [...numericUITypes],
}, },
{ {
text: '<', text: '<',
value: 'lt', value: 'lt',
excludedTypes: [UITypes.Checkbox, UITypes.MultiSelect, UITypes.SingleSelect], includedTypes: [...numericUITypes],
}, },
{ {
text: '>=', text: '>=',
value: 'gte', value: 'gte',
excludedTypes: [UITypes.Checkbox, UITypes.MultiSelect, UITypes.SingleSelect], includedTypes: [...numericUITypes],
}, },
{ {
text: '<=', text: '<=',
value: 'lte', value: 'lte',
excludedTypes: [UITypes.Checkbox, UITypes.MultiSelect, UITypes.SingleSelect], includedTypes: [...numericUITypes],
}, },
] ]

Loading…
Cancel
Save