Browse Source

Merge pull request #1787 from nocodb/fix/search-field

fix: use alias instead of _cn
pull/1789/head
աɨռɢӄաօռɢ 2 years ago committed by GitHub
parent
commit
2a4f95c306
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      packages/nc-gui/components/project/spreadsheet/mixins/spreadsheet.js

2
packages/nc-gui/components/project/spreadsheet/mixins/spreadsheet.js

@ -145,7 +145,7 @@ export default {
concatenatedXWhere() {
let where = ''
if (this.searchField && this.searchQuery.trim()) {
const col = this.availableColumns.find(({ _cn }) => _cn === this.searchField) || this.availableColumns[0]
const col = this.availableColumns.find(({ alias }) => alias === this.searchField) || this.availableColumns[0]
// bigint values are displayed in string format in UI
// when searching bigint values, the operator should be 'eq' instead of 'like'
if (['text', 'string'].includes(this.sqlUi.getAbstractType(col)) && col.dt !== 'bigint') {

Loading…
Cancel
Save