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}
|
||||
>
|
||||
<Flex direction="column" maxH={346} gap={1}>
|
||||
{allowPrivateBoards && <NoBoardBoard isSelected={selectedBoardId === 'none'} />}
|
||||
<NoBoardBoard isSelected={selectedBoardId === 'none'} />
|
||||
{filteredPrivateBoards.map((board) => (
|
||||
<GalleryBoard
|
||||
board={board}
|
||||
|
@ -29,6 +29,7 @@ const NoBoardBoard = memo(({ isSelected }: Props) => {
|
||||
});
|
||||
const autoAddBoardId = useAppSelector((s) => s.gallery.autoAddBoardId);
|
||||
const autoAssignBoardOnClick = useAppSelector((s) => s.gallery.autoAssignBoardOnClick);
|
||||
const boardSearchText = useAppSelector((s) => s.gallery.boardSearchText);
|
||||
const boardName = useBoardName('none');
|
||||
const handleSelectBoard = useCallback(() => {
|
||||
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();
|
||||
|
||||
if (filteredOut) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return (
|
||||
<NoBoardBoardContextMenu>
|
||||
{(ref) => (
|
||||
|
Loading…
Reference in New Issue
Block a user