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 CHANGED
@@ -330,6 +330,7 @@ interface Props {
330
330
  initialSelected?: string[];
331
331
  onSelectionChange?: (selected: string[]) => void;
332
332
  style?: ViewStyle;
333
+ rating?: number;
333
334
  }
334
335
  declare const _default$h: (props: Props) => React$1.JSX.Element;
335
336
 
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