@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/web/index.mjs CHANGED
@@ -1813,8 +1813,8 @@ var ContextMenuRoot = forwardRef9(
1813
1813
  };
1814
1814
  const renderItems = (itemsData) => {
1815
1815
  return itemsData.map((item, index) => {
1816
+ const itemKey = item.id || index;
1816
1817
  const commonProps = {
1817
- key: item.id || index,
1818
1818
  disabled: item.disabled,
1819
1819
  description: item.description,
1820
1820
  "data-testid": `context-menu-item-${item.id || index}`
@@ -1828,7 +1828,8 @@ var ContextMenuRoot = forwardRef9(
1828
1828
  onCheckedChange: (checked) => onCheckedChange?.(item.id, checked),
1829
1829
  onPress: item.onPress,
1830
1830
  children: item.label
1831
- }
1831
+ },
1832
+ itemKey
1832
1833
  );
1833
1834
  }
1834
1835
  if (item.variant === "radio") {
@@ -1839,7 +1840,8 @@ var ContextMenuRoot = forwardRef9(
1839
1840
  value: item.id,
1840
1841
  onPress: item.onPress,
1841
1842
  children: item.label
1842
- }
1843
+ },
1844
+ itemKey
1843
1845
  );
1844
1846
  }
1845
1847
  return /* @__PURE__ */ jsx383(
@@ -1854,7 +1856,8 @@ var ContextMenuRoot = forwardRef9(
1854
1856
  onPress: item.onPress,
1855
1857
  active: activeIndex === index,
1856
1858
  children: item.label
1857
- }
1859
+ },
1860
+ itemKey
1858
1861
  );
1859
1862
  });
1860
1863
  };