fix: also remove from expandedIds when unpinning a notebook
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 1m26s
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 1m26s
This commit is contained in:
@@ -547,6 +547,8 @@ export function Sidebar({ className, user }: { className?: string; user?: any })
|
|||||||
const next = new Set(prev)
|
const next = new Set(prev)
|
||||||
if (next.has(id)) {
|
if (next.has(id)) {
|
||||||
next.delete(id)
|
next.delete(id)
|
||||||
|
// Also collapse the notebook when unpinning
|
||||||
|
setExpandedIds(e => { const ne = new Set(e); ne.delete(id); return ne })
|
||||||
} else {
|
} else {
|
||||||
next.add(id)
|
next.add(id)
|
||||||
// Ensure it's also expanded when pinned
|
// Ensure it's also expanded when pinned
|
||||||
|
|||||||
Reference in New Issue
Block a user