From 88a4c17bbc7a50703d92ff404f9f2803da06435c Mon Sep 17 00:00:00 2001 From: Darin Kelkhoff Date: Tue, 27 Feb 2024 13:57:04 -0600 Subject: [PATCH] CE-798 follow-up - in cleanupValuesInFilerFromQueryString, don't try to translate [null] to a list of possible values (which fetches all of them)... --- src/qqq/utils/qqq/FilterUtils.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/qqq/utils/qqq/FilterUtils.tsx b/src/qqq/utils/qqq/FilterUtils.tsx index ffdd398..b54b651 100644 --- a/src/qqq/utils/qqq/FilterUtils.tsx +++ b/src/qqq/utils/qqq/FilterUtils.tsx @@ -114,8 +114,11 @@ class FilterUtils // e.g., ...values=[1]... // // but we need them to be possibleValue objects (w/ id & label) so the label // // can be shown in the filter dropdown. So, make backend call to look them up. // + // also, there are cases where we can get a null or "" as the only value in the // + // values array - avoid sending that to the backend, as it comes back w/ all // + // possible values, and a general "bad time" // ////////////////////////////////////////////////////////////////////////////////// - if (values && values.length > 0) + if (values && values.length > 0 && values[0] !== null && values[0] !== undefined && values[0] !== "") { values = await qController.possibleValues(fieldTable.name, null, field.name, "", values); }