mirror of
https://github.com/apache/superset.git
synced 2026-08-12 11:11:01 +00:00
fix(roles): prevent 404 and silent user removal on large role edits (#40178)
Co-authored-by: madhushree agarwal <madhushree_agarwal@apple.com>
This commit is contained in:
co-authored by
madhushree agarwal
parent
ac5e8f1308
commit
852d0182b5
@@ -28,6 +28,7 @@ interface FetchPaginatedOptions {
|
||||
setData: (data: any[]) => void;
|
||||
setLoadingState: Dispatch<SetStateAction<any>>;
|
||||
filters?: SupersetFilter[];
|
||||
orderBy?: { column: string; direction: 'asc' | 'desc' };
|
||||
loadingKey: string;
|
||||
addDangerToast: (message: string) => void;
|
||||
errorMessage?: string;
|
||||
@@ -38,6 +39,8 @@ interface QueryObj {
|
||||
page_size: number;
|
||||
page: number;
|
||||
filters?: SupersetFilter[];
|
||||
order_column?: string;
|
||||
order_direction?: 'asc' | 'desc';
|
||||
}
|
||||
|
||||
interface SupersetFilter {
|
||||
@@ -51,6 +54,7 @@ export const fetchPaginatedData = async ({
|
||||
pageSize = 100,
|
||||
setData,
|
||||
filters,
|
||||
orderBy,
|
||||
setLoadingState,
|
||||
loadingKey,
|
||||
addDangerToast,
|
||||
@@ -66,6 +70,10 @@ export const fetchPaginatedData = async ({
|
||||
if (filters) {
|
||||
queryObj.filters = filters;
|
||||
}
|
||||
if (orderBy) {
|
||||
queryObj.order_column = orderBy.column;
|
||||
queryObj.order_direction = orderBy.direction;
|
||||
}
|
||||
const encodedQuery = rison.encode(queryObj);
|
||||
|
||||
const response = await SupersetClient.get({
|
||||
|
||||
Reference in New Issue
Block a user