Skip to content

Conversation

StaymanHou
Copy link
Contributor

Expected behavior

When updating the tab attribute, e.g. badge, while the tab is active, the icon should fallback to the icon attribute if the active-icon attribute is not specified.

Current behavior

In setActive method, it behaves as expected by implicitly not updating the icon if the active-icon attributed is not specified. However, in _updateButtonContent it will set icon to null if the active-icon is not specified.

Temporary solution

I can currently workaround the issue by explicitly set the active-icon attribute to the same value as the icon attribute. But the proposed the change would make the behavior consistent.

## Expected behavior

When updating the tab attribute, e.g. `badge`, while the tab is active, the icon should fallback to the `icon` attribute if the `active-icon` attribute is not specified.

## Current behavior

In `setActive` method, it behaves as expected by implicitly not updating the icon if the `active-icon` attributed is not specified. However, in `_updateButtonContent` it will set icon to null if the `active-icon` is not specified.

## Temporary solution

I can currently workaround the issue by explicitly set the `active-icon` attribute to the same value as the `icon` attribute. But the proposed the change would make the behavior consistent.
@StaymanHou StaymanHou requested a review from emccorson January 20, 2020 16:24
emccorson added a commit that referenced this pull request Feb 28, 2020
@emccorson emccorson merged commit 782cc01 into OnsenUI:master Feb 28, 2020
@emccorson
Copy link
Contributor

Nice catch! Thanks for the PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants