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.mjs
CHANGED
|
@@ -1709,6 +1709,7 @@ const Tabs = ({
|
|
|
1709
1709
|
options,
|
|
1710
1710
|
initialSelected = [],
|
|
1711
1711
|
onSelectionChange,
|
|
1712
|
+
rating,
|
|
1712
1713
|
style
|
|
1713
1714
|
}) => {
|
|
1714
1715
|
const { theme } = useTheme();
|
|
@@ -1719,6 +1720,13 @@ const Tabs = ({
|
|
|
1719
1720
|
isSelected: initialSelected?.includes(option)
|
|
1720
1721
|
}))
|
|
1721
1722
|
);
|
|
1723
|
+
useEffect(() => {
|
|
1724
|
+
setData(options.map((option) => ({
|
|
1725
|
+
title: option,
|
|
1726
|
+
id: option,
|
|
1727
|
+
isSelected: initialSelected?.includes(option)
|
|
1728
|
+
})));
|
|
1729
|
+
}, [rating]);
|
|
1722
1730
|
const handlePress = (id) => {
|
|
1723
1731
|
const updatedData = data?.map(
|
|
1724
1732
|
(item) => item?.id === id ? { ...item, isSelected: !item?.isSelected } : item
|