We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5a4a04a commit 8c21a4bCopy full SHA for 8c21a4b
1 file changed
adminforth/modules/restApi.ts
@@ -1420,8 +1420,10 @@ export default class AdminForthRestAPI implements IAdminForthRestAPI {
1420
: undefined;
1421
1422
// remove virtual fields from sort if still presented after beforeDatasourceRequest hook
1423
+ // and drop sort items referencing columns that don't exist in resource config
1424
const sortFiltered = (sort || []).filter((sortItem: IAdminForthSort) => {
- return !resource.columns.find((col) => col.name === sortItem.field && col.virtual);
1425
+ const col = resource.columns.find((col) => col.name === sortItem.field);
1426
+ return col && !col.virtual;
1427
});
1428
1429
// after beforeDatasourceRequest hook, filter can be anything
0 commit comments