fix(pickers): use_resource subscribes to query signal, populated-list affordance label echoes typed text #192
No reviewers
Labels
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
psa-systems/mokosh-apps!192
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/pms-371-company-picker-filter-and-affordance-label"
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?
The CompanyPicker and AssetPicker both built their query string outside the use_resource closure and captured it as a plain String. Dioxus 0.7's resource tracking subscribes to signals read INSIDE the closure, so the only effect of reading the signal in the parent scope was to re-render the parent. The fetch fired once with the initial empty query and never refreshed when the user typed, leaving the dropdown showing the unfiltered first page regardless of the input field's value. Moved the signal read inside the closure on both pickers so each keystroke triggers a re-fetch against the server's existing ILIKE match on
name.The populated-list branch of the CompanyPicker's inline-create affordance also hardcoded the generic "+ Create new company" label, while the empty-list branch correctly echoed the typed query (
+ Create "Wile E. Coyote Demolition"). Matched the two branches so the affordance label is consistent across both render paths.#PMS-371