Skip to content

md-input-container: mdPrefix and mdSuffix divs should not be present when there is no content #3659

Closed

Description

@natsid

Proposal:

I'd like to propose adding an ngIf on both the .mat-input-prefix and .mat-input-suffix divs in the md-input-container template so that they are only in the DOM if the user has included a prefix/suffix.

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

I'd like to be able to add space between the infix and the affixes, but only when an affix is present.

What is the current behavior?

Currently, if I add any sort of spacing there, the space shows up even without the affix, as seen in the second input here.

Activity

  1. added
    P2
    on Mar 21, 2017
  2. jelbourn commented on Mar 21, 2017

    @jelbourn
    Contributor

    I agree that we should only render those elements if the directives are present.

  3. angular-automatic-lock-bot commented on Sep 5, 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.

  4. locked and limited conversation to collaborators on Sep 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P2

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions