(index)
| 110 | } |
| 111 | |
| 112 | function getPrevTab(index) { |
| 113 | let i = index; |
| 114 | |
| 115 | // Look for non-disabled tab from index to first tab on the left |
| 116 | while (i--) { |
| 117 | if (!isTabDisabled(getTab(i))) { |
| 118 | return i; |
| 119 | } |
| 120 | } |
| 121 | |
| 122 | // If no tab found, continue searching from last tab on right to index |
| 123 | i = getTabsCount(); |
| 124 | while (i-- > index) { |
| 125 | if (!isTabDisabled(getTab(i))) { |
| 126 | return i; |
| 127 | } |
| 128 | } |
| 129 | |
| 130 | // All tabs are disabled, return index |
| 131 | /* istanbul ignore next */ |
| 132 | return index; |
| 133 | } |
| 134 | |
| 135 | function getFirstTab() { |
| 136 | const count = getTabsCount(); |
no test coverage detected
searching dependent graphs…