Merge pull request #7923 from Budibase/bug/sev3/internal-table-sort

Allow sort type to change - Internal DB and REST query search
This commit is contained in:
Martin McKeaveney 2022-09-25 13:39:32 +01:00 committed by GitHub
commit c320c5a9d6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 7 deletions

View File

@ -136,14 +136,12 @@ export default class DataFetch {
}
// Determine what sort type to use
if (!this.options.sortType) {
let sortType = "string"
if (sortColumn) {
const type = schema?.[sortColumn]?.type
sortType = type === "number" ? "number" : "string"
}
this.options.sortType = sortType
let sortType = "string"
if (sortColumn) {
const type = schema?.[sortColumn]?.type
sortType = type === "number" ? "number" : "string"
}
this.options.sortType = sortType
// Build the lucene query
let query = this.options.query