Merge pull request #4228 from pueding/fix/query-pagination-on-production

Fix not showing pagination of query on production
This commit is contained in:
Andrew Kingston 2022-01-31 19:06:00 +00:00 committed by GitHub
commit 50bb4a8ebf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions

View File

@ -16,7 +16,12 @@ export default class QueryFetch extends DataFetch {
if (!datasource?._id) { if (!datasource?._id) {
return null return null
} }
return await fetchQueryDefinition(datasource._id) const definition = await fetchQueryDefinition(datasource._id)
// After getting the definition of query, it loses "fields" attribute because of security reason from the server. However, this attribute needs to be inside of defintion for pagination.
if (!definition.fields) {
definition.fields = datasource.fields
}
return definition
} }
async getData() { async getData() {