From faaf26c17442feff61fc9351d5b7d78bd0798b0b Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Mon, 2 Mar 2026 21:49:20 +0200 Subject: [PATCH] fix(quick_edit): save indicator not shown --- apps/client/src/widgets/dialogs/PopupEditor.tsx | 2 ++ apps/client/src/widgets/layout/NoteBadges.tsx | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/apps/client/src/widgets/dialogs/PopupEditor.tsx b/apps/client/src/widgets/dialogs/PopupEditor.tsx index 07363b2e91..92851ddc93 100644 --- a/apps/client/src/widgets/dialogs/PopupEditor.tsx +++ b/apps/client/src/widgets/dialogs/PopupEditor.tsx @@ -54,6 +54,8 @@ export default function PopupEditor() { } }); + // Events triggered at note context level (e.g. the save indicator) would not work since the note context has no parent component. Propagate events to parent component so that they can be handled properly. + noteContext.triggerEvent = (name, data) => parentComponent?.handleEventInChildren(name, data); setNoteContext(noteContext); setShown(true); }); diff --git a/apps/client/src/widgets/layout/NoteBadges.tsx b/apps/client/src/widgets/layout/NoteBadges.tsx index bf484edf73..917c3ace1e 100644 --- a/apps/client/src/widgets/layout/NoteBadges.tsx +++ b/apps/client/src/widgets/layout/NoteBadges.tsx @@ -7,7 +7,7 @@ import { t } from "../../services/i18n"; import { goToLinkExt } from "../../services/link"; import { Badge, BadgeWithDropdown } from "../react/Badge"; import { FormDropdownDivider, FormListItem } from "../react/FormList"; -import { useGetContextData, useIsNoteReadOnly, useNoteContext, useNoteLabel, useNoteLabelBoolean } from "../react/hooks"; +import { useGetContextDataFrom, useIsNoteReadOnly, useNoteContext, useNoteLabel, useNoteLabelBoolean } from "../react/hooks"; import { useShareState } from "../ribbon/BasicPropertiesTab"; import { useShareInfo } from "../shared_info"; import { ActiveContentBadges } from "./ActiveContentBadges"; @@ -112,7 +112,8 @@ function ExecuteBadge() { } export function SaveStatusBadge() { - const saveState = useGetContextData("saveState"); + const { noteContext} = useNoteContext(); + const saveState = useGetContextDataFrom(noteContext, "saveState"); if (!saveState) return; const stateConfig = {