Skip to content

Commit

Permalink
Get filters from preview list filter
Browse files Browse the repository at this point in the history
  • Loading branch information
Кусак Александр authored and blake-r committed Apr 25, 2023
1 parent 478b5c0 commit 13f63f1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/ExportComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ export const getExportedFileName = (extension: string) =>

const ExportComponent: FC<ActionProps> = ({ resource }) => {
const filter: Record<string, string> = {};
const query = new URLSearchParams(location.search);
const prevFilter: URLSearchParams = new URLSearchParams(JSON.parse(localStorage.getItem("prevPage") ?? "{}")?.search);
let query = prevFilter ?? new URLSearchParams(location.search);
for (const entry of query.entries()) {
const [key, value] = entry;
if (key.match('filters.')) {
Expand Down

0 comments on commit 13f63f1

Please sign in to comment.