fix(URL): allow multi filter query (#3314)
This commit is contained in:
1 parent
25b4f8ed97
commit
45a34ae0fe
2 files changed
+10
-8
No files matched your search
@@ -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 };
|
||||
Reference in new issue
Block a user