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

fix(buttonGroup): Resolve the issue with the emission of buttonSelect… #13861

Merged
merged 1 commit into from
Feb 8, 2024

Conversation

PlamenD95
Copy link
Contributor

@PlamenD95 PlamenD95 commented Feb 5, 2024

…ed on init

Closes #13802

The solution for the issue of calling the buttonSelected event on initialization includes removing the emission of the event from the selected setter in the button.directive.

In place of this functionality, an event listener is implemented in a new AfterContentInit hook, which emits the buttonSelected event only on user clicks.

A MutationObserver is added to check for changes in the DOM when the selected property of the button.directive is updated programmatically, so that the button group can update the styles of its buttons.

Additional information (check all that apply):

  • Bug fix
  • New functionality
  • Documentation
  • Demos
  • CI/CD

Checklist:

  • All relevant tags have been applied to this PR
  • This PR includes unit tests covering all the new code (test guidelines)
  • This PR includes API docs for newly added methods/properties (api docs guidelines)
  • This PR includes feature/README.MD updates for the feature docs
  • This PR includes general feature table updates in the root README.MD
  • This PR includes CHANGELOG.MD updates for newly added functionality
  • This PR contains breaking changes
  • This PR includes ng update migrations for the breaking changes (migrations guidelines)
  • This PR includes behavioral changes and the feature specification has been updated with them

@PlamenD95 PlamenD95 added 🐛 bug Any issue that describes a bug button-group button labels Feb 5, 2024
@hanastasov hanastasov requested review from deyvidnenchev and removed request for hanastasov February 5, 2024 09:35
@hanastasov hanastasov added the ✅ status: verified Applies to PRs that have passed manual verification label Feb 8, 2024
@hanastasov hanastasov merged commit 9831fcc into 16.1.x Feb 8, 2024
6 checks passed
@hanastasov hanastasov deleted the pdobrev/13802-buttonSelected-oninit-16.1.x branch February 8, 2024 07:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Any issue that describes a bug button button-group ✅ status: verified Applies to PRs that have passed manual verification
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants