mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
filter out uncategorized when not included in search
This commit is contained in:
parent
cdacf2ecd0
commit
8826adad24
@ -83,7 +83,7 @@ const BoardsList = (props: Props) => {
|
|||||||
options={overlayScrollbarsParams.options}
|
options={overlayScrollbarsParams.options}
|
||||||
>
|
>
|
||||||
<Flex direction="column" maxH={346} gap={1}>
|
<Flex direction="column" maxH={346} gap={1}>
|
||||||
{allowPrivateBoards && <NoBoardBoard isSelected={selectedBoardId === 'none'} />}
|
<NoBoardBoard isSelected={selectedBoardId === 'none'} />
|
||||||
{filteredPrivateBoards.map((board) => (
|
{filteredPrivateBoards.map((board) => (
|
||||||
<GalleryBoard
|
<GalleryBoard
|
||||||
board={board}
|
board={board}
|
||||||
|
@ -29,6 +29,7 @@ const NoBoardBoard = memo(({ isSelected }: Props) => {
|
|||||||
});
|
});
|
||||||
const autoAddBoardId = useAppSelector((s) => s.gallery.autoAddBoardId);
|
const autoAddBoardId = useAppSelector((s) => s.gallery.autoAddBoardId);
|
||||||
const autoAssignBoardOnClick = useAppSelector((s) => s.gallery.autoAssignBoardOnClick);
|
const autoAssignBoardOnClick = useAppSelector((s) => s.gallery.autoAssignBoardOnClick);
|
||||||
|
const boardSearchText = useAppSelector((s) => s.gallery.boardSearchText);
|
||||||
const boardName = useBoardName('none');
|
const boardName = useBoardName('none');
|
||||||
const handleSelectBoard = useCallback(() => {
|
const handleSelectBoard = useCallback(() => {
|
||||||
dispatch(boardIdSelected({ boardId: 'none' }));
|
dispatch(boardIdSelected({ boardId: 'none' }));
|
||||||
@ -44,7 +45,17 @@ const NoBoardBoard = memo(({ isSelected }: Props) => {
|
|||||||
}),
|
}),
|
||||||
[]
|
[]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const filteredOut = useMemo(() => {
|
||||||
|
return boardSearchText ? !boardName.toLowerCase().includes(boardSearchText.toLowerCase()) : false;
|
||||||
|
}, [boardName, boardSearchText]);
|
||||||
|
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|
||||||
|
if (filteredOut) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<NoBoardBoardContextMenu>
|
<NoBoardBoardContextMenu>
|
||||||
{(ref) => (
|
{(ref) => (
|
||||||
|
Loading…
Reference in New Issue
Block a user