@xsolla/xui-context-menu 0.71.0 → 0.72.0

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/native/index.mjs CHANGED
@@ -1845,8 +1845,8 @@ var ContextMenuRoot = forwardRef9(
1845
1845
  };
1846
1846
  const renderItems = (itemsData) => {
1847
1847
  return itemsData.map((item, index) => {
1848
+ const itemKey = item.id || index;
1848
1849
  const commonProps = {
1849
- key: item.id || index,
1850
1850
  disabled: item.disabled,
1851
1851
  description: item.description,
1852
1852
  "data-testid": `context-menu-item-${item.id || index}`
@@ -1860,7 +1860,8 @@ var ContextMenuRoot = forwardRef9(
1860
1860
  onCheckedChange: (checked) => onCheckedChange?.(item.id, checked),
1861
1861
  onPress: item.onPress,
1862
1862
  children: item.label
1863
- }
1863
+ },
1864
+ itemKey
1864
1865
  );
1865
1866
  }
1866
1867
  if (item.variant === "radio") {
@@ -1871,7 +1872,8 @@ var ContextMenuRoot = forwardRef9(
1871
1872
  value: item.id,
1872
1873
  onPress: item.onPress,
1873
1874
  children: item.label
1874
- }
1875
+ },
1876
+ itemKey
1875
1877
  );
1876
1878
  }
1877
1879
  return /* @__PURE__ */ jsx383(
@@ -1886,7 +1888,8 @@ var ContextMenuRoot = forwardRef9(
1886
1888
  onPress: item.onPress,
1887
1889
  active: activeIndex === index,
1888
1890
  children: item.label
1889
- }
1891
+ },
1892
+ itemKey
1890
1893
  );
1891
1894
  });
1892
1895
  };