diff --git a/src/list.jsx b/src/list.jsx index 0abc980..35e1d05 100644 --- a/src/list.jsx +++ b/src/list.jsx @@ -104,9 +104,7 @@ export default function Frame({ selectedFolderURL, setSelectedFolderURL }) { initial={animation} animate={animation} transition={{ ease: 'anticipate', duration: 0.2 }} - style={{ - borderLeft: '1px solid #e0e0e0', - }} + style={{ borderLeft: '1px solid #e0e0e0' }} >
@@ -127,9 +125,7 @@ export default function Frame({ selectedFolderURL, setSelectedFolderURL }) { const newItem = { id: uuidv4() }; setItems([newItem, ...items]); setCurrentId(newItem.id); - setItem(currentId, { - blocks: null, - }); + setItem(currentId, { blocks: null }); }} /> diff --git a/src/sidebar.jsx b/src/sidebar.jsx index 733b164..6a16f51 100644 --- a/src/sidebar.jsx +++ b/src/sidebar.jsx @@ -17,8 +17,6 @@ export default function SiderBar({ items, setItem, currentId, setCurrentId }) { type: 'list', search: '', filters: [], - page: 1, - perPage: 5, sort: { field: 'path', direction: 'desc', @@ -27,6 +25,12 @@ export default function SiderBar({ items, setItem, currentId, setCurrentId }) { layout: {}, }); + if (view.search) { + items = items.filter(({ path }) => + path.toLowerCase().includes(view.search.toLowerCase()) + ); + } + return (