@dmsi/wedgekit-react 0.0.853 → 0.0.854
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -487,8 +487,8 @@ var ContentTabs = ({
|
|
|
487
487
|
const [focusedTabIndex, setFocusedTabIndex] = (0, import_react2.useState)(0);
|
|
488
488
|
const tabRefs = (0, import_react2.useRef)([]);
|
|
489
489
|
const handleTabClick = (0, import_react2.useCallback)(
|
|
490
|
-
(id2, index) => {
|
|
491
|
-
if (disabledWithColor) return;
|
|
490
|
+
(id2, index, forced) => {
|
|
491
|
+
if (disabledWithColor && !forced) return;
|
|
492
492
|
setSelectedTabId(id2);
|
|
493
493
|
setFocusedTabIndex(index);
|
|
494
494
|
onTabChange == null ? void 0 : onTabChange(id2);
|
|
@@ -497,7 +497,7 @@ var ContentTabs = ({
|
|
|
497
497
|
);
|
|
498
498
|
(0, import_react2.useEffect)(() => {
|
|
499
499
|
if (selectedTab) {
|
|
500
|
-
handleTabClick(selectedTab.id, selectedTab.index);
|
|
500
|
+
handleTabClick(selectedTab.id, selectedTab.index, true);
|
|
501
501
|
}
|
|
502
502
|
}, [selectedTab, handleTabClick]);
|
|
503
503
|
const handleKeyDown = (0, import_react2.useCallback)(
|
|
@@ -27,8 +27,8 @@ var ContentTabs = ({
|
|
|
27
27
|
const [focusedTabIndex, setFocusedTabIndex] = useState(0);
|
|
28
28
|
const tabRefs = useRef([]);
|
|
29
29
|
const handleTabClick = useCallback(
|
|
30
|
-
(id2, index) => {
|
|
31
|
-
if (disabledWithColor) return;
|
|
30
|
+
(id2, index, forced) => {
|
|
31
|
+
if (disabledWithColor && !forced) return;
|
|
32
32
|
setSelectedTabId(id2);
|
|
33
33
|
setFocusedTabIndex(index);
|
|
34
34
|
onTabChange == null ? void 0 : onTabChange(id2);
|
|
@@ -37,7 +37,7 @@ var ContentTabs = ({
|
|
|
37
37
|
);
|
|
38
38
|
useEffect(() => {
|
|
39
39
|
if (selectedTab) {
|
|
40
|
-
handleTabClick(selectedTab.id, selectedTab.index);
|
|
40
|
+
handleTabClick(selectedTab.id, selectedTab.index, true);
|
|
41
41
|
}
|
|
42
42
|
}, [selectedTab, handleTabClick]);
|
|
43
43
|
const handleKeyDown = useCallback(
|