Browse Source

Merge pull request #7628 from nocodb/nc-fix/lookup-number-field-search

Nc fix: search with lookup on numbers does not work
pull/7633/head
Raju Udava 9 months ago committed by GitHub
parent
commit
8d69224082
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 6
      packages/nocodb/src/db/conditionV2.ts
  2. 2
      packages/nocodb/src/db/sortV2.ts

6
packages/nocodb/src/db/conditionV2.ts

@ -667,7 +667,11 @@ const parseConditionV2 = async (
}
}
if (isNumericCol(column.uidt) && typeof genVal === 'string') {
if (
isNumericCol(column.uidt) &&
typeof genVal === 'string' &&
!isNaN(+genVal)
) {
// convert to number
genVal = +genVal;
}

2
packages/nocodb/src/db/sortV2.ts

@ -69,7 +69,7 @@ export default async function sortV2(
model,
column,
{},
alias
alias,
)
).builder;
qb.orderBy(builder, sort.direction || 'asc', nulls);

Loading…
Cancel
Save