File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -61,20 +61,21 @@ const ScrollableTabBar = React.createClass({
6161 const position = Math . floor ( offset . value ) ;
6262 const pageOffset = offset . value % 1 ;
6363 const tabCount = this . props . tabs . length ;
64+ const lastTabPosition = tabCount - 1 ;
6465
65- if ( tabCount === 0 || offset . value < 0 || offset . value > tabCount - 1 ) {
66+ if ( tabCount === 0 || offset . value < 0 || offset . value > lastTabPosition ) {
6667 return ;
6768 }
6869
69- if ( this . necessarilyMeasurementsCompleted ( position ) ) {
70+ if ( this . necessarilyMeasurementsCompleted ( position , position === lastTabPosition ) ) {
7071 this . updateTabPanel ( position , pageOffset ) ;
7172 this . updateTabUnderline ( position , pageOffset , tabCount ) ;
7273 }
7374 } ,
7475
75- necessarilyMeasurementsCompleted ( position ) {
76+ necessarilyMeasurementsCompleted ( position , isLastTab ) {
7677 return this . _tabsMeasurements [ position ] &&
77- this . _tabsMeasurements [ position + 1 ] &&
78+ ( isLastTab || this . _tabsMeasurements [ position + 1 ] ) &&
7879 this . _tabContainerMeasurements &&
7980 this . _containerMeasurements ;
8081 } ,
You can’t perform that action at this time.
0 commit comments