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 Sep 23, 2024
1 parent 12aef9d commit 0c0b519
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion 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 } = useAppStore((s) => s)
const { setSidebarOpen, currentSearch: searchTerm, setSearchFormValue } = useAppStore((s) => s)

const hasAiChats = useHasAiChats()

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

0 comments on commit 0c0b519

Please sign in to comment.