Skip to content

Commit 3d9f041

Browse files
committed
fix: CTabPane: fix tab assignment
1 parent 8f910c1 commit 3d9f041

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/CNavLink.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const getIndex = (el) => Array.from(el.parentNode.children).indexOf(el)
88

99
const getState = ({ current: el }) => {
1010
const hasSiblings = el.parentElement.childNodes.length > 1
11-
return el.dataset.id || getIndex(hasSiblings ? el : el.parentElement)
11+
return el.dataset.tab || getIndex(hasSiblings ? el : el.parentElement)
1212
}
1313

1414
const CNavLink = props => {

src/CTabPane.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { Context } from './CTabs.js'
77
//component - CoreUI / CTabPane
88
const getIndex = (el) => Array.from(el.parentNode.children).indexOf(el)
99

10-
const getState = r => r.current.id || getIndex(r.current)
10+
const getState = r => r.current.dataset.tab || getIndex(r.current)
1111

1212
const CTabPane = props => {
1313

0 commit comments

Comments
 (0)