Dropdowns keep the saved value after saving (#114) #127
No reviewers
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
MassiveDynamic/kataba!127
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feature/114-dropdown-refresh"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes #114: after choosing a value in a dropdown and saving, the old value showed again until a reload.
React 19 resets a form once its Server Action has run, and a
<select>resets to the option that was its default when it mounted, ignoring adefaultValuechanged since. Text inputs, radios and checkboxes follow the new default; selects don't. It showed in the settings form; the guide properties form remounts per version and the other forms redirect, so they were spared.src/forms/components/Select.tsx: a native select keyed by itsdefaultValue, so it mounts afresh when the saved value changes.<select defaultValue>in the forms uses it (settings, license, guide properties, ownership, new guide, import, category). Controlled selects (menu editor, locale switch) are unchanged.e2e/settings.spec.ts: saves the top-level child order to manual and back, checking the dropdown after each save without a reload (failed before the fix).Typecheck, lint, 555 unit tests and all 72 e2e tests pass.
🤖 Generated with Claude Code