Browse Source

fix(nocodb): lookup field search issue if lookup column is number

pull/7628/head
Ramesh Mane 9 months ago
parent
commit
5bf34aa276
  1. 7
      packages/nocodb/src/db/conditionV2.ts
  2. 2
      packages/nocodb/src/db/sortV2.ts

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

@ -667,7 +667,12 @@ const parseConditionV2 = async (
}
}
if (isNumericCol(column.uidt) && typeof genVal === 'string') {
if (
isNumericCol(column.uidt) &&
typeof genVal === 'string' &&
!genVal.startsWith('%') &&
!genVal.endsWith('%')
) {
// 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