From 6b37e66cb9573558eec7a66bcee4cf7d60bd51cc Mon Sep 17 00:00:00 2001 From: Ark2307 Date: Thu, 27 Jun 2024 12:57:51 +0530 Subject: [PATCH] fixing list reload of options in dropwdown --- .../src/apps/dashboard/components/shared/DropdownSearch.jsx | 4 ++-- .../src/apps/dashboard/components/tables/GithubServerTable.js | 4 ---- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/apps/dashboard/web/polaris_web/web/src/apps/dashboard/components/shared/DropdownSearch.jsx b/apps/dashboard/web/polaris_web/web/src/apps/dashboard/components/shared/DropdownSearch.jsx index 82c34b9e21..c8f10be8e0 100644 --- a/apps/dashboard/web/polaris_web/web/src/apps/dashboard/components/shared/DropdownSearch.jsx +++ b/apps/dashboard/web/polaris_web/web/src/apps/dashboard/components/shared/DropdownSearch.jsx @@ -35,7 +35,7 @@ function DropdownSearch(props) { } setOptions((prev) => { - if(func.deepComparison(prev,deselectedOptions)){ + if(selectedOptions.length > 0 || prev.length > 0){ return prev; } return deselectedOptions; @@ -66,7 +66,7 @@ function DropdownSearch(props) { } setTimeout(() => { - if (value === '') { + if (value === '' && selectedOptions.length === 0) { setOptions(deselectedOptions); setLoading(false); return; diff --git a/apps/dashboard/web/polaris_web/web/src/apps/dashboard/components/tables/GithubServerTable.js b/apps/dashboard/web/polaris_web/web/src/apps/dashboard/components/tables/GithubServerTable.js index f09ad477c7..e1cdb0443a 100644 --- a/apps/dashboard/web/polaris_web/web/src/apps/dashboard/components/tables/GithubServerTable.js +++ b/apps/dashboard/web/polaris_web/web/src/apps/dashboard/components/tables/GithubServerTable.js @@ -231,10 +231,6 @@ function GithubServerTable(props) { appliedFilters.filter((localFilter) => { return localFilter.key == filter.key }).length == 1 ? appliedFilters.filter((localFilter) => { return localFilter.key == filter.key })[0].value : filter.selected || [] } - value={ - appliedFilters.filter((localFilter) => { return localFilter.key == filter.key }).length == 1 ? - appliedFilters.filter((localFilter) => { return localFilter.key == filter.key })[0].value : filter.selected || [] - } /> ), // shortcut: true,