fix: ignore trash (#1426)
This commit is contained in:
@@ -93,27 +93,32 @@ export const Results: React.FC<ResultsProps> = ({
|
|||||||
<div>
|
<div>
|
||||||
{recentlyViewed.length > 0 && (
|
{recentlyViewed.length > 0 && (
|
||||||
<Command.Group heading={t('Recent')}>
|
<Command.Group heading={t('Recent')}>
|
||||||
{recentlyViewed.map(recent => {
|
{recentlyViewed
|
||||||
return (
|
.filter(
|
||||||
<Command.Item
|
recent =>
|
||||||
key={recent.id}
|
pageList.find(page => recent.id === page.id)?.trash !== true
|
||||||
value={recent.id}
|
)
|
||||||
onSelect={() => {
|
.map(recent => {
|
||||||
onClose();
|
return (
|
||||||
jumpToPage(blockSuiteWorkspace.id, recent.id);
|
<Command.Item
|
||||||
}}
|
key={recent.id}
|
||||||
>
|
value={recent.id}
|
||||||
<StyledListItem>
|
onSelect={() => {
|
||||||
{recent.mode === 'edgeless' ? (
|
onClose();
|
||||||
<EdgelessIcon />
|
jumpToPage(blockSuiteWorkspace.id, recent.id);
|
||||||
) : (
|
}}
|
||||||
<PaperIcon />
|
>
|
||||||
)}
|
<StyledListItem>
|
||||||
<span>{recent.title}</span>
|
{recent.mode === 'edgeless' ? (
|
||||||
</StyledListItem>
|
<EdgelessIcon />
|
||||||
</Command.Item>
|
) : (
|
||||||
);
|
<PaperIcon />
|
||||||
})}
|
)}
|
||||||
|
<span>{recent.title}</span>
|
||||||
|
</StyledListItem>
|
||||||
|
</Command.Item>
|
||||||
|
);
|
||||||
|
})}
|
||||||
</Command.Group>
|
</Command.Group>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user