mirror of
https://github.com/luxfi/explore.git
synced 2026-09-24 00:28:18 +00:00
Advanced filter (#1905)
* advanced filter start * advanced filters stage 2 * adv filters stage 3 * fixes * add test * eslint fixes * age filter update * some fixes and filters tests * fixes 2 * add csv export * fixes 3 * add env variable for adv filter * fix tests * edit env temporary
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
export default function getValuesArrayFromQuery(val: string | Array<string> | undefined) {
|
||||
if (val === undefined) {
|
||||
return;
|
||||
}
|
||||
|
||||
const valArray = [];
|
||||
if (typeof val === 'string') {
|
||||
valArray.push(...val.split(','));
|
||||
}
|
||||
if (Array.isArray(val)) {
|
||||
if (!val.length) {
|
||||
return;
|
||||
}
|
||||
val.forEach(el => valArray.push(...el.split(',')));
|
||||
}
|
||||
|
||||
return valArray;
|
||||
}
|
||||
Reference in New Issue
Block a user