@mw-kit/mw-ui 1.7.99 → 1.7.100
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.
|
@@ -9,6 +9,10 @@ declare type Tab<T = {}> = {
|
|
|
9
9
|
* Define the tab data.
|
|
10
10
|
*/
|
|
11
11
|
data: T;
|
|
12
|
+
/**
|
|
13
|
+
* Providing a unique and static key will prevent remount the component when closing a previous tab
|
|
14
|
+
*/
|
|
15
|
+
key?: React.Key | null;
|
|
12
16
|
};
|
|
13
17
|
export declare type TabComponent<T = {}> = React.FunctionComponent<{
|
|
14
18
|
data: T;
|
package/dist/index.js
CHANGED
|
@@ -19517,7 +19517,7 @@ var Tabs$1 = function Tabs$1(props) {
|
|
|
19517
19517
|
};
|
|
19518
19518
|
|
|
19519
19519
|
return React__default.createElement(Provider, Object.assign({
|
|
19520
|
-
key: index,
|
|
19520
|
+
key: tab.key !== undefined ? tab.key : index,
|
|
19521
19521
|
label: tab.label,
|
|
19522
19522
|
data: tab.data,
|
|
19523
19523
|
setTab: setTab
|