fix(form): bind controlled value on the Select element itself (MAPPS-270) #285

Merged
YousifShkara merged 1 commit from fix/MAPPS-270-inline-edit-refresh into main 2026-06-21 07:04:56 +02:00
Owner

The shared Select rendered selection via per-option selected={value == opt.value} attributes but never bound value on the <select> element. After an external mutation re-renders the component with a new props.value (the ticket-detail inline Status / Priority / Assigned-To editors call tr.restart() on the ticket resource), the browser keeps the user's last click on screen instead of repainting to the new controlled value, because the selected per-option diff is a no-op against the already-clicked option. The QA report read this as "the change failed" - the value did persist, the dropdown just refused to follow. Binding value="{props.value}" on the <select> itself forces the displayed choice to follow the controlled prop, and the per-option selected binding stays for the first paint before Dioxus mounts. Audited the other inline-edit dropdowns on the detail page; all of them go through this same Select, so the single fix covers Status, Priority, Assigned-To, and any future addition.

#MAPPS-270

The shared `Select` rendered selection via per-option `selected={value == opt.value}` attributes but never bound `value` on the `<select>` element. After an external mutation re-renders the component with a new `props.value` (the ticket-detail inline Status / Priority / Assigned-To editors call `tr.restart()` on the ticket resource), the browser keeps the user's last click on screen instead of repainting to the new controlled value, because the `selected` per-option diff is a no-op against the already-clicked option. The QA report read this as "the change failed" - the value did persist, the dropdown just refused to follow. Binding `value="{props.value}"` on the `<select>` itself forces the displayed choice to follow the controlled prop, and the per-option `selected` binding stays for the first paint before Dioxus mounts. Audited the other inline-edit dropdowns on the detail page; all of them go through this same `Select`, so the single fix covers Status, Priority, Assigned-To, and any future addition. #MAPPS-270
fix(form): bind controlled value on the Select element itself (MAPPS-270)
All checks were successful
Create release / Create release from merged PR (pull_request) Has been skipped
Check / clippy + fmt + tests (pull_request) Successful in 1m19s
b377f3186b
The shared `Select` rendered selection via per-option `selected={value == opt.value}` attributes but never bound `value` on the `<select>` element. After an external mutation re-renders the component with a new `props.value` (the ticket-detail inline Status / Priority / Assigned-To editors call `tr.restart()` on the ticket resource), the browser keeps the user's last click on screen instead of repainting to the new controlled value, because the `selected` per-option diff is a no-op against the already-clicked option. The QA report read this as "the change failed" - the value did persist, the dropdown just refused to follow. Binding `value="{props.value}"` on the `<select>` itself forces the displayed choice to follow the controlled prop, and the per-option `selected` binding stays for the first paint before Dioxus mounts. Audited the other inline-edit dropdowns on the detail page; all of them go through this same `Select`, so the single fix covers Status, Priority, Assigned-To, and any future addition.

#MAPPS-270
YousifShkara deleted branch fix/MAPPS-270-inline-edit-refresh 2026-06-21 07:04:56 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
psa-systems/mokosh-apps!285
No description provided.