Skip to content

Commit

Permalink
Merge pull request #1228 from akto-api-security/fix/fix_dropdown_search
Browse files Browse the repository at this point in the history
Fixing list reload of options in dropwdown
  • Loading branch information
notshivansh authored Jun 27, 2024
2 parents 07a6a1c + 6b37e66 commit e14c676
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -66,7 +66,7 @@ function DropdownSearch(props) {
}

setTimeout(() => {
if (value === '') {
if (value === '' && selectedOptions.length === 0) {
setOptions(deselectedOptions);
setLoading(false);
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit e14c676

Please sign in to comment.