You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After a Tab component is rendered on the screen, we can modify the items prop and pass in a new array. For example, we might display one tab on larger screens while two tabs on the smaller screens. If the second item was selected as active and then the screen size is changed so that the items array has only one element in it, activeTabIndex becomes out of bounds and we don't display anything as the tab body. In this case, I think we can simply fallback and set the activeTabIndex as 0. Example use case of this is available on Tinyman on the staking program detail.
The text was updated successfully, but these errors were encountered:
After a Tab component is rendered on the screen, we can modify the
items
prop and pass in a new array. For example, we might display one tab on larger screens while two tabs on the smaller screens. If the second item was selected as active and then the screen size is changed so that theitems
array has only one element in it,activeTabIndex
becomes out of bounds and we don't display anything as the tab body. In this case, I think we can simply fallback and set the activeTabIndex as 0. Example use case of this is available on Tinyman on the staking program detail.The text was updated successfully, but these errors were encountered: