Skip to content

Commit

Permalink
Merge pull request #2390 from Ekep-Obasi/fix/clear-filter-action
Browse files Browse the repository at this point in the history
fix: clear filter button not resetting results when clicked
  • Loading branch information
Rassl authored Oct 27, 2024
2 parents a11ed37 + 7a4b63f commit 88efb68
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/App/SideBar/FilterSearch/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const defaultValues = {

export const FilterSearch = ({ anchorEl, setAnchorEl, onClose }: Props) => {
const [schemaAll, setSchemaAll] = useSchemaStore((s) => [s.schemas, s.setSchemas])
const { setFilters } = useDataStore((s) => s)
const { abortFetchData, resetGraph, setFilters } = useDataStore((s) => s)
const [selectedTypes, setSelectedTypes] = useState<string[]>(defaultValues.selectedTypes)
const [hops, setHops] = useState(defaultValues.hops)
const [sourceNodes, setSourceNodes] = useState<number>(defaultValues.sourceNodes)
Expand Down Expand Up @@ -69,6 +69,8 @@ export const FilterSearch = ({ anchorEl, setAnchorEl, onClose }: Props) => {

const handleClear = async () => {
resetToDefaultValues()
abortFetchData()
resetGraph()
}

const handleFiltersApply = async () => {
Expand Down

0 comments on commit 88efb68

Please sign in to comment.