Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chip - allow removable property while template is defined #1256

Closed
gabrielthomasjacobs opened this issue May 13, 2021 · 1 comment
Closed
Assignees
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@gabrielthomasjacobs
Copy link

**I'm submitting a

[X] feature request

Current behavior
Adding any template within the chip tag prevents the removable property from being respected
E.g.
<Chip label="label set via attribute" removable />
will render a chip with a label and an icon to remove the chip.

But:
<Chip removable> label set via template</Chip>
will not render a removable icon.

Expected behavior
If removable property is set, render the remove icon at the end of chip, regardless of what template contains.
Properties removable, removeIconClass, and the remove event should all still be used while template exists.

other properties such as label and icon are easily re-implemented, so not as important
(also hard to know which should be placed first between attribute label and template label. Whereas removable would be expected to be rendered at end of chip).

What is the motivation / use case for changing the behavior?
Prevents users from having to manually implement remove functionality and callback when it already exists.

@cagataycivici cagataycivici self-assigned this May 18, 2021
@cagataycivici cagataycivici added the Type: Bug Issue contains a bug related to a specific component. Something about the component is not working label May 18, 2021
@cagataycivici cagataycivici added this to the 3.5.0 milestone May 18, 2021
@gabrielthomasjacobs
Copy link
Author

Amazingly fast. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
None yet
Development

No branches or pull requests

2 participants