fix(type_widgets): switching between note types shows wrong content

This commit is contained in:
Elian Doran
2025-11-09 13:24:12 +02:00
parent d4194c503c
commit c772430dd0

View File

@@ -193,12 +193,12 @@ export default function NoteDetail() {
ref={containerRef} ref={containerRef}
class={`note-detail ${isFullHeight ? "full-height" : ""}`} class={`note-detail ${isFullHeight ? "full-height" : ""}`}
> >
{Object.entries(noteTypesToRender.current).map(([ type, Element ]) => { {Object.entries(noteTypesToRender.current).map(([ itemType, Element ]) => {
return <NoteDetailWrapper return <NoteDetailWrapper
Element={Element} Element={Element}
key={type} key={itemType}
type={type as ExtendedNoteType} type={itemType as ExtendedNoteType}
isVisible={activeNoteType === type} isVisible={type === itemType}
isFullHeight={isFullHeight} isFullHeight={isFullHeight}
props={props} props={props}
/> />