Skip to content
This repository has been archived by the owner on Oct 19, 2021. It is now read-only.

fix(Tabs): avoid stale tab ref cache #2224

Merged

Conversation

asudoh
Copy link
Contributor

@asudoh asudoh commented Apr 17, 2019

The problem happens when selected and children changes at the same time.

Fixes #2204.

Changelog

Changed

  • A change not to use the cache of tab's DOM ref when the <Tabs> code gets selected tab's label.

The problem happens when `selected` and `children` changes at the same
time.

Fixes #2204.
@netlify
Copy link

netlify bot commented Apr 17, 2019

Deploy preview for carbon-components-react ready!

Built with commit 8d47f65

https://deploy-preview-2224--carbon-components-react.netlify.com

Copy link
Member

@emyarod emyarod left a comment

Choose a reason for hiding this comment

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

is there some overlap with #2196?

@asudoh
Copy link
Contributor Author

asudoh commented Apr 17, 2019

@emyarod Good question - #2196 calls a different internal method that has more overhead (notably copying props over). That's why I came up with a different PR. Hope it explains things well.

Copy link
Member

@emyarod emyarod left a comment

Choose a reason for hiding this comment

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

looks good to me! so this would supersede #2196 then right?

@asudoh
Copy link
Contributor Author

asudoh commented Apr 18, 2019

so this would supersede #2196 then right?

Yes.

@asudoh asudoh merged commit 2335c44 into carbon-design-system:master Apr 20, 2019
@asudoh asudoh deleted the gettabat-before-cache-available branch April 20, 2019 00:03
@vpicone vpicone mentioned this pull request Apr 30, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tabs dropdown label references cached tab label
3 participants