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

Tabs: prevent active tab from becoming negative index which causes error in React #1532

Merged
merged 9 commits into from
Oct 9, 2024

Conversation

akashyeole
Copy link
Member

@akashyeole akashyeole commented Oct 9, 2024

By creating this pull request you agree to the terms in CONTRIBUTING.md.
https://github.com/Infineon/.github/blob/master/CONTRIBUTING.md
--- DO NOT DELETE ANYTHING ABOVE THIS LINE ---

Description
A console error would appear in react app in tab component because of useRef, fixed it by using useState hook.
Additionally, implemented array-index-out-of-bound check in tabs code component.

Related Issue
#1468

📦 Published PR as canary version: 25.7.2--canary.1532.ad21b50ecfebca94216b0eb139834e81320e97d5.0

✨ Test out this PR locally via:

npm install @infineon/infineon-design-system-stencil@25.7.2--canary.1532.ad21b50ecfebca94216b0eb139834e81320e97d5.0
# or 
yarn add @infineon/infineon-design-system-stencil@25.7.2--canary.1532.ad21b50ecfebca94216b0eb139834e81320e97d5.0

@akashyeole akashyeole added the patch patch version bump label Oct 9, 2024
@akashyeole akashyeole self-assigned this Oct 9, 2024
@akashyeole akashyeole linked an issue Oct 9, 2024 that may be closed by this pull request
Copy link
Contributor

github-actions bot commented Oct 9, 2024

PR Preview Action v1.4.8
Preview removed because the pull request was closed.
2024-10-09 10:25 UTC

Copy link
Contributor

github-actions bot commented Oct 9, 2024

--STORYBOOK-PREVIEW--

@verena-ifx
Copy link
Contributor

Can be merged, after the merge conflicts are resolved :)

@tishoyanchev tishoyanchev changed the title fix(1468): console error in tab component Tabs: prevent active tab from becoming negative index which causes error in React Oct 9, 2024
@tishoyanchev tishoyanchev merged commit 345be64 into master Oct 9, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
patch patch version bump
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tabs: error when ran in React
3 participants