dhre-ui-kit 0.0.295 → 0.0.296
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/lib/index.d.ts +1 -0
- package/lib/index.js +8 -0
- package/lib/index.js.map +1 -1
- package/lib/index.mjs +8 -0
- package/lib/index.mjs.map +1 -1
- package/package.json +1 -1
package/lib/index.d.ts
CHANGED
package/lib/index.js
CHANGED
|
@@ -1746,6 +1746,7 @@ const Tabs = ({
|
|
|
1746
1746
|
options,
|
|
1747
1747
|
initialSelected = [],
|
|
1748
1748
|
onSelectionChange,
|
|
1749
|
+
rating,
|
|
1749
1750
|
style
|
|
1750
1751
|
}) => {
|
|
1751
1752
|
const { theme } = useTheme();
|
|
@@ -1756,6 +1757,13 @@ const Tabs = ({
|
|
|
1756
1757
|
isSelected: initialSelected?.includes(option)
|
|
1757
1758
|
}))
|
|
1758
1759
|
);
|
|
1760
|
+
React.useEffect(() => {
|
|
1761
|
+
setData(options.map((option) => ({
|
|
1762
|
+
title: option,
|
|
1763
|
+
id: option,
|
|
1764
|
+
isSelected: initialSelected?.includes(option)
|
|
1765
|
+
})));
|
|
1766
|
+
}, [rating]);
|
|
1759
1767
|
const handlePress = (id) => {
|
|
1760
1768
|
const updatedData = data?.map(
|
|
1761
1769
|
(item) => item?.id === id ? { ...item, isSelected: !item?.isSelected } : item
|