Browse Source

fix(nc-gui): incorrect conditions in getEqText & getNeqText

pull/5306/head
Wing-Kam Wong 2 years ago
parent
commit
d9ca4ac64a
  1. 4
      packages/nc-gui/utils/filterUtils.ts

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

@ -1,7 +1,7 @@
import { isNumericCol, numericUITypes, UITypes } from 'nocodb-sdk' import { isNumericCol, numericUITypes, UITypes } from 'nocodb-sdk'
const getEqText = (fieldUiType: UITypes) => { const getEqText = (fieldUiType: UITypes) => {
if (isNumericCol(fieldUiType) || UITypes.Time) { if (isNumericCol(fieldUiType) || fieldUiType === UITypes.Time) {
return '=' return '='
} else if ( } else if (
[UITypes.SingleSelect, UITypes.Collaborator, UITypes.LinkToAnotherRecord, UITypes.Date, UITypes.DateTime].includes( [UITypes.SingleSelect, UITypes.Collaborator, UITypes.LinkToAnotherRecord, UITypes.Date, UITypes.DateTime].includes(
@ -14,7 +14,7 @@ const getEqText = (fieldUiType: UITypes) => {
} }
const getNeqText = (fieldUiType: UITypes) => { const getNeqText = (fieldUiType: UITypes) => {
if (isNumericCol(fieldUiType) || UITypes.Time) { if (isNumericCol(fieldUiType) || fieldUiType === UITypes.Time) {
return '!=' return '!='
} else if ( } else if (
[UITypes.SingleSelect, UITypes.Collaborator, UITypes.LinkToAnotherRecord, UITypes.Date, UITypes.DateTime].includes( [UITypes.SingleSelect, UITypes.Collaborator, UITypes.LinkToAnotherRecord, UITypes.Date, UITypes.DateTime].includes(

Loading…
Cancel
Save