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(content-switcher): get current content-switcher-item on icon click #11602

Conversation

emyarod
Copy link
Member

@emyarod emyarod commented Feb 29, 2024

Related Ticket(s)

Closes #10963

Description

This PR updates the content switcher to fetch the current content switcher item even when an icon within the item is clicked

Changelog

New

  • _getCurrentItem method

Changed

  • content-switcher click handler

@emyarod emyarod self-assigned this Feb 29, 2024
@emyarod emyarod requested a review from a team as a code owner February 29, 2024 15:24
@emyarod emyarod requested review from kennylam and annawen1 and removed request for a team February 29, 2024 15:24
@ibmdotcom-bot
Copy link
Contributor

ibmdotcom-bot commented Feb 29, 2024

@ibmdotcom-bot
Copy link
Contributor

ibmdotcom-bot commented Feb 29, 2024

@ibmdotcom-bot
Copy link
Contributor

ibmdotcom-bot commented Feb 29, 2024

@ibmdotcom-bot
Copy link
Contributor

ibmdotcom-bot commented Feb 29, 2024

Copy link
Member

@kennylam kennylam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@kennylam kennylam added the Ready to merge Label for the pull requests that are ready to merge label Feb 29, 2024
@kodiakhq kodiakhq bot merged commit 271295a into carbon-design-system:main Mar 1, 2024
12 of 19 checks passed
Copy link
Contributor

Hey there! This issue/pull request was referenced in recently released v2.5.0.

kennylam pushed a commit to kennylam/carbon-for-ibm-dotcom that referenced this pull request Mar 20, 2024
carbon-design-system#11602)

### Related Ticket(s)

Closes carbon-design-system#10963

### Description

This PR updates the content switcher to fetch the current content switcher item even when an icon within the item is clicked

### Changelog

**New**

- `_getCurrentItem` method

**Changed**

- content-switcher click handler

<!-- React and Web Component deploy previews are enabled by default. -->
<!-- To enable additional available deploy previews, apply the following -->
<!-- labels for the corresponding package: -->
<!-- *** "test: e2e": Codesandbox examples and e2e integration tests -->
<!-- *** "package: services": Services -->
<!-- *** "package: utilities": Utilities -->
<!-- *** "RTL": React / Web Components (RTL) -->
<!-- *** "feature flag": React / Web Components (experimental) -->
kennylam pushed a commit to kennylam/carbon-for-ibm-dotcom that referenced this pull request Jun 11, 2024
carbon-design-system#11602)

### Related Ticket(s)

Closes carbon-design-system#10963

### Description

This PR updates the content switcher to fetch the current content switcher item even when an icon within the item is clicked

### Changelog

**New**

- `_getCurrentItem` method

**Changed**

- content-switcher click handler

<!-- React and Web Component deploy previews are enabled by default. -->
<!-- To enable additional available deploy previews, apply the following -->
<!-- labels for the corresponding package: -->
<!-- *** "test: e2e": Codesandbox examples and e2e integration tests -->
<!-- *** "package: services": Services -->
<!-- *** "package: utilities": Utilities -->
<!-- *** "RTL": React / Web Components (RTL) -->
<!-- *** "feature flag": React / Web Components (experimental) -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package: carbon web components Ready to merge Label for the pull requests that are ready to merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Web Components]: Content Switcher Item is not selected when clicking over icon
3 participants