Merge pull request #4228 from pueding/fix/query-pagination-on-production
Fix not showing pagination of query on production
This commit is contained in:
commit
50bb4a8ebf
|
@ -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() {
|
||||||
|
|
Loading…
Reference in New Issue