Skip to content

fix: auto-focus search box when link record selector opens#3582

Open
ajuijas wants to merge 1 commit into
teableio:developfrom
ajuijas:fix/2928-linked-record-selection
Open

fix: auto-focus search box when link record selector opens#3582
ajuijas wants to merge 1 commit into
teableio:developfrom
ajuijas:fix/2928-linked-record-selection

Conversation

@ajuijas

@ajuijas ajuijas commented Jul 14, 2026

Copy link
Copy Markdown

Summary

  • The linked-record row selector's search input didn't receive focus when the popup opened, so users had to click into it before they could start typing (issue also notes the popup itself requires a double-click to open, which is existing, consistent grid behavior shared by every field type's cell editor).
  • Auto-focuses the search input on mount in SearchInput (new optional autoFocus prop, opt-in so the other consumer of this shared component, the settings query builder's persistent search bar, is unaffected) and wires it up from the link editor's EditorMain.

Why this option (of the two proposed in the issue)

The issue offered two options: make the cell searchable on a single click, or keep the existing double-click-to-open flow and just auto-focus the search box. Went with the latter: double-click-to-edit is the grid's shared activation gesture across every field type (packages/sdk/src/components/grid/InteractionLayer.tsx's onDblClick), so changing it for link fields only would special-case one field type against the whole interaction model (single click is also used for cell selection/range-select) for a much larger, riskier change. Auto-focusing the search input is a small, localized fix that removes the actual friction described (an extra click before typing).

Test plan

  • Manually reviewed the diff line-by-line (imports, hook ordering, prop plumbing) for correctness.
  • Could not run pnpm install/build/lint/typecheck in my environment (tooling install was blocked by sandbox restrictions with no interactive approval available). Noting this rather than claiming it was verified. Happy to address any build/lint feedback from CI.

Fixes #2928

@CLAassistant

CLAassistant commented Jul 14, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@ajuijas
ajuijas changed the base branch from main to develop July 18, 2026 16:39
The row selector for linked-record fields did not focus its search
input on open, requiring an extra click before typing. Auto-focus the
search input when the link editor mounts.

Signed-off-by: ajuijas <189517297+ajuijas@users.noreply.github.com>
@ajuijas
ajuijas force-pushed the fix/2928-linked-record-selection branch from 370d896 to 5b41232 Compare July 18, 2026 16:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Reduce steps for linked record selection

2 participants