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.

mdChips: empty chips are added as contact chips #2268

Closed
@Frank3K

Description

@Frank3K

It is relatively easy to add empty chips in the current implementation of contact chips demo. Just type some text and press the enter key without selecting a suggestion from the dropdown.

This happens in the following situations:

  1. You type the full name of one of the contacts.
  2. You type the full email-address of one of the contacts.
  3. You type an email-address that is not in the contacts.
  4. You type some random string, which does not match any of the above.

In situation 1 and 2, it would be nice if the corresponding contact would be added as a chip. This could be done after pressing the enter key; since names often contain spaces it would be hard otherwise.

In situation 3, there are I think (at least) two use cases:
a. You want to restrict the user to only allow chips corresponding to contacts in the predefined set. The entered email-address should be discarded.
b. You want to allow the user to add additional email-addresses of contacts who are not in the predefined set. Useful for e.g. a email-form. The entered email-address should be added as a chip without image.

In situation 4, the card should be discarded. Or is there also a valid use case for creating a chip with the entered text?

Currently, situations 1 to 4 lead to an empty chip / contact being added:

mdchips_contacts

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions