nntc-ui 0.0.23 → 0.0.25
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/{index.mjs → index.js}
RENAMED
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
SortDownIcon,
|
|
17
17
|
SortUpIcon,
|
|
18
18
|
__export
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-KAV5YKL7.js";
|
|
20
20
|
|
|
21
21
|
// src/components/common/Button/Button.tsx
|
|
22
22
|
import classnames from "classnames";
|
|
@@ -2020,15 +2020,20 @@ function Tabs(props) {
|
|
|
2020
2020
|
filled: filled7 = false,
|
|
2021
2021
|
isVertical = false,
|
|
2022
2022
|
disableBorder: disableBorder2 = false,
|
|
2023
|
+
allowDeselect = false,
|
|
2023
2024
|
classes
|
|
2024
2025
|
} = props;
|
|
2025
2026
|
const [isMounted, setIsMounted] = useState8(false);
|
|
2026
2027
|
const [selectedTab, setSelectedTab] = useState8(defaultSelected);
|
|
2027
2028
|
const handleClick = (newValue) => () => {
|
|
2028
|
-
|
|
2029
|
+
if (allowDeselect && selectedTab === newValue) {
|
|
2030
|
+
setSelectedTab(void 0);
|
|
2031
|
+
} else {
|
|
2032
|
+
setSelectedTab(newValue);
|
|
2033
|
+
}
|
|
2029
2034
|
};
|
|
2030
2035
|
useEffect5(() => {
|
|
2031
|
-
if (isMounted
|
|
2036
|
+
if (isMounted) {
|
|
2032
2037
|
onChange?.(selectedTab);
|
|
2033
2038
|
}
|
|
2034
2039
|
if (!isMounted) {
|
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|