Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

After Clicking Show Result Button, [FilterSearch] Modal Does Not Automatically #1966

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/components/App/SideBar/FilterSearch/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ type Props = {
setShowAllSchemas: (value: boolean) => void
schemaAll: SchemaExtended[]
anchorEl: HTMLElement | null
setAnchorEl: (value: HTMLElement | null) => void
}

const defaultValues = {
Expand All @@ -26,7 +27,7 @@ const defaultValues = {
maxResults: 30,
}

export const FilterSearch = ({ showAllSchemas, setShowAllSchemas, schemaAll, anchorEl }: Props) => {
export const FilterSearch = ({ showAllSchemas, setShowAllSchemas, schemaAll, anchorEl, setAnchorEl }: Props) => {
const handleSchemaTypeClick = (type: string) => {
setSelectedTypes((prevSelectedTypes) =>
prevSelectedTypes.includes(type) ? prevSelectedTypes.filter((t) => t !== type) : [...prevSelectedTypes, type],
Expand Down Expand Up @@ -63,6 +64,8 @@ export const FilterSearch = ({ showAllSchemas, setShowAllSchemas, schemaAll, anc
top_node_count: sourceNodes.toString(),
})

setAnchorEl(null)

await fetchData(setBudget, setAbortRequests)
}

Expand Down
1 change: 1 addition & 0 deletions src/components/App/SideBar/RegularView/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ export const RegularView = () => {
<FilterSearch
anchorEl={anchorEl}
schemaAll={schemaAll}
setAnchorEl={setAnchorEl}
setShowAllSchemas={setShowAllSchemas}
showAllSchemas={showAllSchemas}
/>
Expand Down
Loading