added formgenerator filter query parameter to pass with url
This commit is contained in:
parent
892603156c
commit
1d0cb96a91
2 changed files with 5 additions and 3 deletions
|
|
@ -226,6 +226,7 @@ export interface FormGeneratorTableProps<T = any> {
|
||||||
groupRowData?: (groupKey: string, groupRows: T[]) => Record<string, React.ReactNode>;
|
groupRowData?: (groupKey: string, groupRows: T[]) => Record<string, React.ReactNode>;
|
||||||
groupDefaultExpanded?: boolean;
|
groupDefaultExpanded?: boolean;
|
||||||
groupActions?: (groupKey: string, groupRows: T[]) => React.ReactNode;
|
groupActions?: (groupKey: string, groupRows: T[]) => React.ReactNode;
|
||||||
|
initialSearchTerm?: string;
|
||||||
rowDraggable?: boolean;
|
rowDraggable?: boolean;
|
||||||
onRowDragStart?: (e: React.DragEvent<HTMLTableRowElement>, row: T) => void;
|
onRowDragStart?: (e: React.DragEvent<HTMLTableRowElement>, row: T) => void;
|
||||||
}
|
}
|
||||||
|
|
@ -327,6 +328,7 @@ export function FormGeneratorTable<T extends Record<string, any>>({
|
||||||
groupRowData,
|
groupRowData,
|
||||||
groupDefaultExpanded = true,
|
groupDefaultExpanded = true,
|
||||||
groupActions,
|
groupActions,
|
||||||
|
initialSearchTerm = '',
|
||||||
rowDraggable = false,
|
rowDraggable = false,
|
||||||
onRowDragStart,
|
onRowDragStart,
|
||||||
}: FormGeneratorTableProps<T>) {
|
}: FormGeneratorTableProps<T>) {
|
||||||
|
|
@ -368,7 +370,7 @@ export function FormGeneratorTable<T extends Record<string, any>>({
|
||||||
}, [providedColumns, data]);
|
}, [providedColumns, data]);
|
||||||
|
|
||||||
// State management
|
// State management
|
||||||
const [searchTerm, setSearchTerm] = useState('');
|
const [searchTerm, setSearchTerm] = useState(initialSearchTerm);
|
||||||
const [searchFocused, setSearchFocused] = useState(false);
|
const [searchFocused, setSearchFocused] = useState(false);
|
||||||
const [filterFocused, setFilterFocused] = useState<Record<string, boolean>>({});
|
const [filterFocused, setFilterFocused] = useState<Record<string, boolean>>({});
|
||||||
// Multi-column sorting: array of sort configs in order of priority
|
// Multi-column sorting: array of sort configs in order of priority
|
||||||
|
|
|
||||||
|
|
@ -28,8 +28,8 @@ function Login() {
|
||||||
const pendingInvitationToken = localStorage.getItem(PENDING_INVITATION_KEY);
|
const pendingInvitationToken = localStorage.getItem(PENDING_INVITATION_KEY);
|
||||||
const hasPendingInvitation = !!pendingInvitationToken;
|
const hasPendingInvitation = !!pendingInvitationToken;
|
||||||
|
|
||||||
// Get the page the user was trying to visit
|
const fromLocation = location.state?.from;
|
||||||
const from = location.state?.from?.pathname || "/";
|
const from = (fromLocation?.pathname || "/") + (fromLocation?.search || "");
|
||||||
|
|
||||||
// Set page title and generate CSRF token
|
// Set page title and generate CSRF token
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue