Skip to content

Commit

Permalink
Merge pull request #2062 from Shoaibdev7/show-results-button-not-work
Browse files Browse the repository at this point in the history
Fixed(Show-Results): Show Results button doesn't do anything
  • Loading branch information
Rassl authored Aug 23, 2024
2 parents 746d3d7 + e35c68a commit 6831b66
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/components/App/SideBar/FilterSearch/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import PlusIcon from '~/components/Icons/PlusIcon'
import { SchemaExtended } from '~/components/ModalsContainer/BlueprintModal/types'
import { Flex } from '~/components/common/Flex'
import { useDataStore } from '~/stores/useDataStore'
import { useUserStore } from '~/stores/useUserStore'
import { colors } from '~/utils/colors'
import { Hops } from './Hops'
import { MaxResults } from './MaxResults'
Expand All @@ -25,7 +26,8 @@ export const FilterSearch = ({ showAllSchemas, setShowAllSchemas, schemaAll, anc
)
}

const { setFilters } = useDataStore((s) => s)
const { setFilters, fetchData, setAbortRequests } = useDataStore((s) => s)
const [setBudget] = useUserStore((s) => [s.setBudget])
const [selectedTypes, setSelectedTypes] = useState<string[]>([])
const [hops, setHops] = useState(1)
const [sourceNodes, setSourceNodes] = useState<number>(10)
Expand All @@ -39,13 +41,15 @@ export const FilterSearch = ({ showAllSchemas, setShowAllSchemas, schemaAll, anc
setShowAllSchemas(true)
}

const handleFiltersApply = () => {
const handleFiltersApply = async () => {
setFilters({
node_type: selectedTypes,
limit: maxResults.toString(),
depth: hops.toString(),
top_node_count: sourceNodes.toString(),
})

await fetchData(setBudget, setAbortRequests)
}

return (
Expand Down

0 comments on commit 6831b66

Please sign in to comment.