Keep queued typing selections when reopening the menu

This commit is contained in:
David Heinemeier Hansson committed 2026-10-09 16:51:38 +02:00
1 parent fbc6daea8b
commit 99f32458d6
5 files changed
+26 -7

No files matched your search

+2
View File
@@ -170,3 +170,5 @@ how the pickers behind menu actions (`omarchy-menu-plugin`,
Pass `-- --multiple` to `omarchy-menu-select` for a multi-select request. Repeat `--selected <value>` to preselect returned values (labels plus any subtext, without icons). Clicking or pressing Enter toggles an option without closing the menu; Apply returns a JSON array in option order, including `[]` when all choices are deselected. Cancellation still exits 1. Selections survive filtering.
With `--on-change <JSON command array>`, each toggle runs that command with the proposed selection JSON appended as its final argument, and no Apply row is shown. The checkbox changes only after the command succeeds; a failed command retains the previous selection. Changes persist when the menu closes. The typing selectors use this mode.
For immediate multi-select requests, `--change-key <key>` identifies the setting being changed across picker openings. The menu keeps queued selections for that key when reopened, so a new toggle cannot discard a change still being saved. Without a key, the command array identifies the setting.