Found while fixing #134 (PR #162). That PR fixed the judging-criteria and prize edit forms plus three
siblings, and swept the 20 backend pages with a combobox — this one was identified as affected but
left out as belonging to the teams module.
What happens
src/modules/teams/backend/resources/[id]/edit/page.tsx:34:
{ id: 'team_id', label: t('teams.resources.fields.team', 'Team'), type: 'combobox', required: true, loadOptions: loadTeams }
It is the first field in the first group (:50), it is required, it loads its options
asynchronously, and the form passes neither disableInitialFocus to CrudForm nor seedOptions for
the already-selected team. That is the exact combination behind #90 and #134: on open, the combobox
takes initial focus, which clears the displayed value before loadOptions resolves, so the user sees
an empty Team picker on a record that has a team.
Expected
Apply the same remedy as PR #132 (for #90) and PR #162 (for #134): a resolved seedOptions for the
current team_id fed from the load path, plus disableInitialFocus on CrudForm. Roughly a
three-line change; the two existing PRs are the template.
Found while fixing #134 (PR #162). That PR fixed the judging-criteria and prize edit forms plus three
siblings, and swept the 20 backend pages with a combobox — this one was identified as affected but
left out as belonging to the teams module.
What happens
src/modules/teams/backend/resources/[id]/edit/page.tsx:34:It is the first field in the first group (
:50), it isrequired, it loads its optionsasynchronously, and the form passes neither
disableInitialFocustoCrudFormnorseedOptionsforthe already-selected team. That is the exact combination behind #90 and #134: on open, the combobox
takes initial focus, which clears the displayed value before
loadOptionsresolves, so the user seesan empty Team picker on a record that has a team.
Expected
Apply the same remedy as PR #132 (for #90) and PR #162 (for #134): a resolved
seedOptionsfor thecurrent
team_idfed from the load path, plusdisableInitialFocusonCrudForm. Roughly athree-line change; the two existing PRs are the template.