Browse Source

fix: revise filterComparisonOp for mm, hm & bt

pull/2535/head
Wing-Kam Wong 2 years ago
parent
commit
8c082d4259
  1. 18
      packages/nc-gui/components/project/spreadsheet/components/ColumnFilter.vue

18
packages/nc-gui/components/project/spreadsheet/components/ColumnFilter.vue

@ -324,12 +324,22 @@ export default {
if ( if (
f && f &&
f.fk_column_id && f.fk_column_id &&
this.columnsById[f.fk_column_id] && this.columnsById[f.fk_column_id]
this.columnsById[f.fk_column_id].uidt ===
UITypes.LinkToAnotherRecord &&
this.columnsById[f.fk_column_id].uidt === UITypes.Lookup
) { ) {
const uidt = this.columnsById[f.fk_column_id].uidt
if (uidt === UITypes.Lookup) {
// TODO: handle it later
return !['notempty', 'empty', 'notnull', 'null'].includes(op.value) return !['notempty', 'empty', 'notnull', 'null'].includes(op.value)
} else if (uidt === UITypes.LinkToAnotherRecord) {
const type = this.columnsById[f.fk_column_id].colOptions.type
if (type === 'hm' || type === 'mm') {
// exclude notnull & null
return !['notnull', 'null'].includes(op.value)
} else if (type === 'bt') {
// exclude notempty & empty
return !['notempty', 'empty'].includes(op.value)
}
}
} }
return true return true
}) })

Loading…
Cancel
Save