Skip to content

Team resources edit form shows an empty Team picker (same defect as #90/#134) #181

Description

@pat-lewczuk

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions