Skip to content

Autocomplete should have an input for panelClass #7021

Closed

Description

@asw225

Bug, feature request, or proposal:

Feature request

What is the expected behavior?

There should be a way to style the panel created by the autocomplete component.

What is the current behavior?

The mat-autocomplete-panel div is added dynamically, outside the current component. The only way to specify styles would be to use a /deep/ selector. But this only works globally, so there would be no way to style the panels of individual autocompletes.

What are the steps to reproduce?

Any use of mat-autocomplete.

What is the use-case or motivation for changing an existing behavior?

Sizing is one possible use case for specifying styles on the autocomplete panel. Current behavior will truncate the options if their widths exceed the width of the panel. Adding a style to the panel such as min-width: fit-content would be a desirable solution.

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

All versions.

Is there anything else we should know?

The solution should be essentially the same as #4485

Activity

  1. willshowell commented on Sep 13, 2017

    @willshowell
    Contributor

    PR has been opened #6618 but not yet reviewed

  2. Splaktar commented on Sep 16, 2017

    @Splaktar
    Contributor

    Seems like a duplicate of #4196.

  3. crisbeto commented on Sep 19, 2017

    @crisbeto
    Member

    Closing as a dupe of #4196.

  4. angular-automatic-lock-bot commented on Sep 7, 2019

    @angular-automatic-lock-bot

    This issue has been automatically locked due to inactivity.
    Please file a new issue if you are encountering a similar or related problem.

    Read more about our automatic conversation locking policy.

    This action has been performed automatically by a bot.

  5. locked and limited conversation to collaborators on Sep 7, 2019
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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions