Skip to content

Commit

Permalink
fix(sid-bar): search text clears after click colllapsed button
Browse files Browse the repository at this point in the history
  • Loading branch information
sophieturner0 committed Oct 17, 2024
1 parent 0cd7594 commit 16f0ac1
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/components/App/SideBar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ type ContentProp = {

// eslint-disable-next-line react/display-name
const Content = forwardRef<HTMLDivElement, ContentProp>(({ subViewOpen }, ref) => {
const { setSidebarOpen, currentSearch: searchTerm, setSearchFormValue } = useAppStore((s) => s)
const { setSidebarOpen} = useAppStore((s) => s)

const hasAiChats = useHasAiChats()

Expand All @@ -32,7 +32,6 @@ const Content = forwardRef<HTMLDivElement, ContentProp>(({ subViewOpen }, ref) =
<CollapseButton
onClick={() => {
setSidebarOpen(false)
setSearchFormValue(searchTerm || '')
}}
>
<ChevronLeftIcon />
Expand Down Expand Up @@ -67,7 +66,7 @@ export const SideBar = () => {

return (
<>
<Slide direction="right" in={sidebarIsOpen} mountOnEnter unmountOnExit>
<Slide direction="right" in={sidebarIsOpen}>
<Content subViewOpen={subViewIsOpen} />
</Slide>
<SideBarSubView open={subViewIsOpen} />
Expand Down

0 comments on commit 16f0ac1

Please sign in to comment.