implement datatable sorting on non-analytics tables. (website/board/link/pixel/team/admin)
This commit is contained in:
1 parent
b5c4dbfa56
commit
5ccfb6d0a5
39 files changed
+322
-100
No files matched your search
@@ -82,6 +82,16 @@ export const pagingParams = {
|
||||
|
||||
export const sortingParams = {
|
||||
orderBy: z.string().optional(),
|
||||
sortDescending: z
|
||||
.enum(['true', 'false'])
|
||||
.optional()
|
||||
.transform(value => {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
return value === 'true';
|
||||
}),
|
||||
};
|
||||
|
||||
export const userRoleParam = z.enum(['admin', 'user', 'view-only']);
|
||||
|
||||
Reference in new issue
Block a user