fix(URL): allow multi filter query (#3314)

This commit is contained in:
Bill Wallace authored and GitHub committed 2023-04-05 16:37:37 -04:00
1 parent 25b4f8ed97
commit 45a34ae0fe
2 files changed
+10 -8

No files matched your search

+4 -4
View File
@@ -21,11 +21,11 @@ const getSplitParam = (
lowerCaseKey: string,
params = new URLSearchParams(window.location.search)
): string[] => {
return splitComma(
[...params]
.find(([key, value]) => key.toLowerCase() === lowerCaseKey && value)
?.slice?.(1)
const sourceKey = [...params.keys()].find(
it => it.toLowerCase() === lowerCaseKey
);
if (!sourceKey) return;
return splitComma(params.getAll(sourceKey));
};
export { splitComma, getSplitParam };