mirror of
https://github.com/stack-auth/stack.git
synced 2026-06-30 21:01:54 +08:00
Default user export to filtered scope and note Anonymous in all-users label
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
parent
cf4f9b8918
commit
c7b8651b7d
@ -426,7 +426,8 @@ function UserTableBody(props: {
|
||||
fetchRows: fetchExportRows,
|
||||
emptyExportTitle: "No users to export",
|
||||
emptyExportDescription: "There are no users matching the current filters",
|
||||
allScopeLabel: "Export all users in the project",
|
||||
defaultScope: "filtered",
|
||||
allScopeLabel: "Export all users in the project (includes Anonymous)",
|
||||
filteredScopeLabel: (
|
||||
<>
|
||||
Export only filtered/searched users
|
||||
|
||||
@ -55,7 +55,7 @@ export function DataGridExportDialog<TRow>({
|
||||
[exportOptions?.fields, columns],
|
||||
);
|
||||
const [format, setFormat] = useState<DataGridExportFormat>("csv");
|
||||
const [scope, setScope] = useState<DataGridExportScope>("all");
|
||||
const [scope, setScope] = useState<DataGridExportScope>(exportOptions?.defaultScope ?? "all");
|
||||
const [fields, setFields] = useState<readonly DataGridExportField<TRow>[]>(resolvedFields);
|
||||
const [isExporting, setIsExporting] = useState(false);
|
||||
const [progress, setProgress] = useState<ExportProgress>(idleExportProgress);
|
||||
|
||||
@ -251,6 +251,8 @@ export type DataGridExportOptions<TRow> = {
|
||||
allScopeLabel?: ReactNode;
|
||||
filteredScopeLabel?: ReactNode;
|
||||
progressSubjectLabel?: string;
|
||||
/** Which export scope is selected by default when the dialog opens. Defaults to `"all"`. */
|
||||
defaultScope?: DataGridExportScope;
|
||||
};
|
||||
|
||||
// ─── Callbacks ───────────────────────────────────────────────────────
|
||||
|
||||
Loading…
Reference in New Issue
Block a user