Browse Source

feat(nc-gui): disable date & datetime for like and nlike

pull/5185/head
Wing-Kam Wong 2 years ago
parent
commit
49fa6e8959
  1. 20
      packages/nc-gui/utils/filterUtils.ts

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

@ -105,13 +105,29 @@ export const comparisonOpList = (
text: getLikeText(fieldUiType), text: getLikeText(fieldUiType),
value: 'like', value: 'like',
ignoreVal: false, ignoreVal: false,
excludedTypes: [UITypes.Checkbox, UITypes.SingleSelect, UITypes.MultiSelect, UITypes.Collaborator, ...numericUITypes], excludedTypes: [
UITypes.Checkbox,
UITypes.SingleSelect,
UITypes.MultiSelect,
UITypes.Collaborator,
UITypes.Date,
UITypes.DateTime,
...numericUITypes,
],
}, },
{ {
text: getNotLikeText(fieldUiType), text: getNotLikeText(fieldUiType),
value: 'nlike', value: 'nlike',
ignoreVal: false, ignoreVal: false,
excludedTypes: [UITypes.Checkbox, UITypes.SingleSelect, UITypes.MultiSelect, UITypes.Collaborator, ...numericUITypes], excludedTypes: [
UITypes.Checkbox,
UITypes.SingleSelect,
UITypes.MultiSelect,
UITypes.Collaborator,
UITypes.Date,
UITypes.DateTime,
...numericUITypes,
],
}, },
{ {
text: 'is empty', text: 'is empty',

Loading…
Cancel
Save