next-helios-fe 1.8.42 → 1.8.43
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.
package/package.json
CHANGED
@@ -35,19 +35,6 @@ export const Tab: TabComponent = ({
|
|
35
35
|
});
|
36
36
|
const [activeTab, setActiveTab] = useState(0);
|
37
37
|
|
38
|
-
useEffect(() => {
|
39
|
-
if (tabs.length === 1) {
|
40
|
-
setActiveTab(0);
|
41
|
-
}
|
42
|
-
|
43
|
-
if (onChangeTab) {
|
44
|
-
onChangeTab({
|
45
|
-
index: activeTab,
|
46
|
-
title: tabs[activeTab].title,
|
47
|
-
});
|
48
|
-
}
|
49
|
-
}, [tabs, activeTab]);
|
50
|
-
|
51
38
|
return (
|
52
39
|
<div
|
53
40
|
className={`flex w-full h-full overlow-hidden ${
|
@@ -115,6 +102,13 @@ export const Tab: TabComponent = ({
|
|
115
102
|
}`}
|
116
103
|
onClick={() => {
|
117
104
|
setActiveTab(index);
|
105
|
+
|
106
|
+
if (onChangeTab) {
|
107
|
+
onChangeTab({
|
108
|
+
index: index,
|
109
|
+
title: tabs[index].title,
|
110
|
+
});
|
111
|
+
}
|
118
112
|
}}
|
119
113
|
>
|
120
114
|
{tab?.icon && <Icon icon={tab?.icon} className="text-lg" />}
|