react-tabtab
react-tabtab copied to clipboard
if the last tab has been removed because of props update, it throws an error: TypeError: Cannot read property '__INTERNAL_NODE' of undefined
When the last tab gets removed, because of property updates (i create tabs by iterating over an array and then i remove an entry from the array), i get this error:
TypeError: Cannot read property '__INTERNAL_NODE' of undefined
at TabListComponent.getTabNode (/node_modules/react-tabtab/lib/TabList.js:166:15)
at TabListComponent.scrollToIndex (/node_modules/react-tabtab/lib/TabList.js:212:28)
at TabListComponent.componentDidUpdate (/node_modules/react-tabtab/lib/TabList.js:147:14)
ok problem is, because after update, scrollToIndex does not respect array size. It should limit this.props.activeIndex to the bounds of the array
cool, thanks for the bug report. Could you help to fix this bug?