Skip to content
This repository was archived by the owner on Sep 5, 2024. It is now read-only.
This repository was archived by the owner on Sep 5, 2024. It is now read-only.

mdContactChips: add option to specify default image #4779

@Frank3K

Description

@Frank3K

In the current implementation of md-contact-chips one can specify the field name of the image corresponding to a contact using the md-contact-image attribute.

However, when a given contact does not have set that field (i.e. the contact does not have an image), an empty <img /> tag is rendered. Since an alt-attribute is added to the image some browsers (at least Chromium on Linux) render the image as wide as the contents of the alt-attribute. This messes with the layout of the contact chips.

It would be nice if there was a way to specify a default image, which is used in case there is no corresponding image. Another (slightly inferior) option would be to not render the <img /> at all.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions