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

Setting a new icon to LeftIconItem, the previous one is not removed correctly #463

Open
Dudeplayz opened this issue Jul 1, 2022 · 0 comments
Labels

Comments

@Dudeplayz
Copy link

Describe the bug

Setting a new icon to LeftIconItem the previous item is not removed.
Possibly caused by a copy & paste action.

public void setIcon(Component icon) {
if (this.icon != null) {
remove(caption);
}
this.icon = icon;
if (icon != null) {
getElement().insertChild(0, this.icon.getElement());
}
}

Line 44 has to be:

remove(icon);

Expected behavior

The previous item is removed correctly.

Additional Information (please complete the following information):

  • Version 21.0.0-beta1
@Dudeplayz Dudeplayz added the bug label Jul 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant