Skip to content

Conversation

@1307-Dev
Copy link
Contributor

💡 What is the current behavior?

While using custom tree, clicking on tree-items doesn't trigger selection of these tree items.

GitHub Issue Number: #2098

🆕 What is the new behavior?

Click events are now registered and the tree items are now selectable.

🏁 Checklist

A pull request can only be merged if all of these conditions are met (where applicable):

  • 🦮 Accessibility (a11y) features were implemented
  • 🗺️ Internationalization (i18n) - no hard coded strings
  • 📲 Responsiveness - components handle viewport changes and content overflow gracefully
  • 📕 Add or update a Storybook story
  • 📄 Documentation was reviewed/updated siemens/ix-docs
  • 🧪 Unit tests were added/updated and pass (pnpm test)
  • 📸 Visual regression tests were added/updated and pass (Guide)
  • 🧐 Static code analysis passes (pnpm lint)
  • 🏗️ Successful compilation (pnpm build, changes pushed)

👨‍💻 Help & support

@changeset-bot
Copy link

changeset-bot bot commented Nov 11, 2025

⚠️ No Changeset found

Latest commit: 812105b

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@sonarqubecloud
Copy link

@1307-Dev 1307-Dev changed the title Added fix and test fix(core/tree)- Fixed tree-items in custom tree component. Nov 11, 2025
}

const id = target.getAttribute('data-tree-node-id');
let treeNodeElement = target;
Copy link
Contributor

Choose a reason for hiding this comment

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

Duplicated with the above changed code.


if (!event.defaultPrevented) {
Object.values(this.context).forEach((c) => (c.isSelected = false));
for (const c of Object.values(this.context)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Please avoid using single alphabet variable names. Use word.

@1307-Dev 1307-Dev marked this pull request as ready for review November 17, 2025 05:28
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