From 723a7611038b9c14fccf0a37f87b8ff0e2f04e89 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Wed, 13 Jan 2021 18:43:53 +0000 Subject: [PATCH] --- ayanova/src/components/pick-list.vue | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/ayanova/src/components/pick-list.vue b/ayanova/src/components/pick-list.vue index 5b1427a1..678a7b25 100644 --- a/ayanova/src/components/pick-list.vue +++ b/ayanova/src/components/pick-list.vue @@ -290,17 +290,18 @@ export default { //default params for when called on init if (!pickListParams) { pickListParams = { - ayaType: vm.ayaType, - preselectedIds: [vm.value] + ayaType: vm.ayaType }; - // urlParams = "?ayaType=" + vm.ayaType; + + if (vm.value != null) { + pickListParams["preselectedIds"] = vm.value; + } + if (vm.includeInactive) { pickListParams["inactive"] = true; - //urlParams += "&inactive=true"; } if (vm.variant != null) { pickListParams["listVariant"] = vm.variant; - //urlParams += `&variant=${vm.variant}`; } } try { @@ -403,16 +404,18 @@ export default { query += " " + queryTerms[1]; } //urlParams += "&query=" + query; - pickListParams["query"]=query; + pickListParams["query"] = query; } if (vm.includeInactive) { - urlParams += "&inactive=true"; + pickListParams["inactive"] = true; + //urlParams += "&inactive=true"; } if (vm.variant != null) { - urlParams += `&variant=${vm.variant}`; + pickListParams["listVariant"] = vm.variant; + //urlParams += `&variant=${vm.variant}`; } - this.getList(urlParams); + this.getList(pickListParams); //------------ }, 300) //did some checking, 200-300ms seems to be the most common debounce time for ajax search queries }