Skip to content

Commit

Permalink
fix(ui): do not reset board search wehn collapsing boards list
Browse files Browse the repository at this point in the history
  • Loading branch information
psychedelicious committed Sep 11, 2024
1 parent 7e757f1 commit 5eedeb3
Showing 1 changed file with 1 addition and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,22 +50,14 @@ const GalleryPanelContent = () => {
boardsListPanel.expand();
}, [boardSearchText.length, boardSearchDisclosure, boardsListPanel, dispatch]);

const handleToggleBoardPanel = useCallback(() => {
if (boardSearchText.length) {
dispatch(boardSearchTextChanged(''));
}
boardSearchDisclosure.onClose();
boardsListPanel.toggle();
}, [boardSearchText.length, boardSearchDisclosure, boardsListPanel, dispatch]);

return (
<Flex ref={ref} position="relative" flexDirection="column" h="full" w="full" tabIndex={-1}>
<GalleryHeader />
<Flex alignItems="center" w="full">
<Button
size="sm"
variant="ghost"
onClick={handleToggleBoardPanel}
onClick={boardsListPanel.toggle}
rightIcon={boardsListPanel.isCollapsed ? <PiCaretDownBold /> : <PiCaretUpBold />}
>
{boardsListPanel.isCollapsed ? t('boards.viewBoards') : t('boards.hideBoards')}
Expand Down

0 comments on commit 5eedeb3

Please sign in to comment.