Skip to content

Commit

Permalink
Merge pull request #1050 from akto-api-security/fix/fix_search_in_table
Browse files Browse the repository at this point in the history
fixed search in tables
  • Loading branch information
aktoboy authored Apr 23, 2024
2 parents 28a4455 + 459a04b commit cf06534
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ function GithubServerTable(props) {
const currentPageKey = props?.filterStateUrl || window.location.href
const pageFiltersMap = filtersMap[currentPageKey]

const filterMode = (pageFiltersMap?.filters.length > 0) ? IndexFiltersMode.Filtering : (props?.mode ? props.mode : IndexFiltersMode.Filtering)
const filterMode = (pageFiltersMap?.filters?.length > 0) ? IndexFiltersMode.Filtering : (props?.mode ? props.mode : IndexFiltersMode.Filtering)
const initialStateFilters = tableFunc.mergeFilters(props.appliedFilters || [], (pageFiltersMap?.filters || []),props.disambiguateLabel)
const { mode, setMode } = useSetIndexFiltersMode(filterMode);
const [sortSelected, setSortSelected] = useState(tableFunc.getInitialSortSelected(props.sortOptions, pageFiltersMap))
Expand Down Expand Up @@ -147,9 +147,9 @@ function GithubServerTable(props) {
setAppliedFilters(temp);
};

const debouncedSearch = useCallback(debounce((searchQuery) => {
const debouncedSearch = debounce((searchQuery) => {
fetchData(searchQuery)
}, 500), []);
}, 500);

const handleFiltersQueryChange = (val) =>{
setQueryValue(val)
Expand Down

0 comments on commit cf06534

Please sign in to comment.