Skip to content

Conversation

@SkyZeroZx
Copy link
Contributor

Extends the focus method of form fields and custom controls to accept and propagate FocusOptions.

This enables developers to control focus behavior more precisely, for example, preventing scrolling when focusing an element.

@Component({
  imports: [FormField],
  template: ` <!--  A large form template  --> `,
})
export class MyFormComponent {
  complexForm = form(
    signal({
      // Large form object
      description: '',
    }),
  );

  focusDescription() {
    this.complexForm
      .description()
      .focusBoundControl({ preventScroll: true });
  }
}

@pullapprove pullapprove bot requested a review from devversion January 13, 2026 20:47
@angular-robot angular-robot bot added detected: feature PR contains a feature commit area: forms labels Jan 13, 2026
@ngbot ngbot bot added this to the Backlog milestone Jan 13, 2026
@SkyZeroZx SkyZeroZx force-pushed the add-focus-options-signal-forms branch from 5f2071e to 486dae4 Compare January 13, 2026 20:48
@JeanMeche JeanMeche requested review from mmalerba and removed request for devversion January 14, 2026 01:04
Copy link
Contributor

@thePunderWoman thePunderWoman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reviewed-for: public-api

@thePunderWoman
Copy link
Contributor

@SkyZeroZx this has lint failures that need addressing.

Extends the `focus` method of form fields and custom controls to accept and propagate `FocusOptions`.

This enables developers to control focus behavior more precisely, for example, preventing scrolling when focusing an element.
@SkyZeroZx SkyZeroZx force-pushed the add-focus-options-signal-forms branch from 486dae4 to b3c6596 Compare January 14, 2026 18:28
@SkyZeroZx
Copy link
Contributor Author

@SkyZeroZx this has lint failures that need addressing.

Done

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

Labels

area: forms detected: feature PR contains a feature commit

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants