Save button now closes dialog and update label to "Save and Close"
The previous Save button only persisted data without dismissing the dialog, requiring a second click. Now it flushes the note and all dirty rows, then closes the dialog in the same interaction. The label change makes the combined action explicit to the user.
This commit is contained in:
parent
f204f41b68
commit
05a633458d
|
|
@ -364,7 +364,12 @@ export function GroupSessionDialog({
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
<Button
|
<Button
|
||||||
onClick={handleSaveAll}
|
onClick={() => {
|
||||||
|
// Save first (flushing the note + every dirty row), then
|
||||||
|
// close -- handleOpenChange's own background flush is a
|
||||||
|
// no-op at that point.
|
||||||
|
void handleSaveAll().then(() => handleOpenChange(false));
|
||||||
|
}}
|
||||||
disabled={savingAll}
|
disabled={savingAll}
|
||||||
className="hover:brightness-110"
|
className="hover:brightness-110"
|
||||||
style={{
|
style={{
|
||||||
|
|
@ -376,7 +381,7 @@ export function GroupSessionDialog({
|
||||||
color: isDark ? "#18181b" : "#ffffff",
|
color: isDark ? "#18181b" : "#ffffff",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{savingAll ? "Saving…" : "Save"}
|
{savingAll ? "Saving…" : "Save and Close"}
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
</DialogContent>
|
</DialogContent>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue