(index)
| 88 | } |
| 89 | |
| 90 | function getNextTab(index) { |
| 91 | const count = getTabsCount(); |
| 92 | |
| 93 | // Look for non-disabled tab from index to the last tab on the right |
| 94 | for (let i = index + 1; i < count; i++) { |
| 95 | if (!isTabDisabled(getTab(i))) { |
| 96 | return i; |
| 97 | } |
| 98 | } |
| 99 | |
| 100 | // If no tab found, continue searching from first on left to index |
| 101 | for (let i = 0; i < index; i++) { |
| 102 | if (!isTabDisabled(getTab(i))) { |
| 103 | return i; |
| 104 | } |
| 105 | } |
| 106 | |
| 107 | // All tabs are disabled, return index |
| 108 | /* istanbul ignore next */ |
| 109 | return index; |
| 110 | } |
| 111 | |
| 112 | function getPrevTab(index) { |
| 113 | let i = index; |
no test coverage detected
searching dependent graphs…