Skip to content

bug(paginator-mdc): Paginator form field appearance does not honor MAT_FORM_FIELD_DEFAULT_OPTIONS #26580

Open
@PowerKiKi

Description

@PowerKiKi

Is this a regression?

  • Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was

No response

Description

When using the new MDC paginator, if setting a global field appearance with MAT_FORM_FIELD_DEFAULT_OPTIONS, or not doing anything to use the (new) default of fill style, then the new MDC Paginator will not honor any of those. Instead, it will fallback to its own hardcoded default, which is outline. That is strikingly different than the global default of fill.

I would be willing to create a PR to implement cascading defaults. If MatPaginatorDefaultOptions is defined uses that, else if MatFormFieldDefaultOptions is defined use that, or else use the same global default as MatFormField which is DEFAULT_APPEARANCE. Would this kind of PR has a chance of being merged ?

Reproduction

Steps to reproduce:

  1. Go to https://stackblitz.com/edit/components-issue-scusbg?file=src%2Fapp%2Fexample-component.html
  2. See that Paginator has different default appearance than select box, but it should not.

Expected Behavior

Paginator should honor the global default appearance, which is fill or might be user-defined.

Actual Behavior

It has a hardcoded default of outline and can only be changed via MatPaginatorDefaultOptions, and never via MatFormFieldDefaultOptions.

Environment

  • Angular: 15.1
  • CDK/Material: 15.1
  • Browser(s): Chrome 109
  • Operating System (e.g. Windows, macOS, Ubuntu): Ubuntu

Metadata

Metadata

Assignees

No one assigned

    Labels

    P4A relatively minor issue that is not relevant to core functionsarea: material/paginator

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions