Skip to content

Commit 66c0d01

Browse files
author
JoW
committed
multiple values for a parameter in standalone mode
1 parent 25a0782 commit 66c0d01

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

docs/modules/ROOT/pages/developer-guide/standalone-mode.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ To dynamically view a deployed NeoDash dashboard, you can deep-link into a deplo
7373
the following deeplinking options are available via URL parameters:
7474
- Appending `?page=1` to the URL will open up a dashboard at a given page. (Starting at zero).
7575
- Appending `?neodash_person_name=Tom` to the URL will set a dashboard parameter as a default for the entire dashboard.
76+
- Appending `?neodash_list_person_name=Tom&neodash_list_person_name=Peter` to the URL will pass one parameter person_name as an array you can use in WHERE IN clauses
7677

7778
Multiple parameters can be used in a deep-link by concatinating them:
7879
....

src/application/ApplicationThunks.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,14 @@ export const handleSharedDashboardsThunk = () => (dispatch: any) => {
244244
const paramsToSetAfterConnecting = {};
245245
Array.from(urlParams.entries()).forEach(([key, value]) => {
246246
if (key.startsWith('neodash_')) {
247-
paramsToSetAfterConnecting[key] = value;
247+
if (key.startsWith('neodash_list_')) {
248+
if (paramsToSetAfterConnecting[key] ==null){
249+
paramsToSetAfterConnecting[key]=[];
250+
}
251+
paramsToSetAfterConnecting[key].push(value);
252+
} else {
253+
paramsToSetAfterConnecting[key] = value;
254+
}
248255
}
249256
});
250257
if (Object.keys(paramsToSetAfterConnecting).length > 0) {

0 commit comments

Comments
 (0)