fix(core): prevent undefined access of ref elements#2570
Conversation
✅ Deploy Preview for ix-storybook canceled.
|
🦋 Changeset detectedLatest commit: 2165495 The changes in this PR will be included in the next version bump. This PR includes changesets to release 5 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
Code Review
This pull request introduces a helper function forceTabIndex to safely apply tabIndex during the render phase, preventing undefined access issues in ix-date-input, ix-dropdown-button, and ix-time-input. It also removes non-null assertions from ref callbacks. The review feedback suggests typing the element parameter in forceTabIndex to accept null to align with Stencil's unmounting behavior, handling potential null values when assigning menuItemsContainer in menu-category.tsx, and correcting a typo in the changeset file.
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
|



💡 What is the current behavior?
GitHub Issue Number: #2568
🆕 What is the new behavior?
Make ref check before accessing tabIndex
🏁 Checklist
A pull request can only be merged if all of these conditions are met (where applicable):
pnpm test)pnpm lint)pnpm build, changes pushed)👨💻 Help & support