@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.js +7 -4
- package/native/index.js.map +1 -1
- package/native/index.mjs +7 -4
- package/native/index.mjs.map +1 -1
- package/package.json +8 -8
- package/web/index.js +7 -4
- package/web/index.js.map +1 -1
- package/web/index.mjs +7 -4
- package/web/index.mjs.map +1 -1
package/native/index.js
CHANGED
|
@@ -1882,8 +1882,8 @@ var ContextMenuRoot = (0, import_react11.forwardRef)(
|
|
|
1882
1882
|
};
|
|
1883
1883
|
const renderItems = (itemsData) => {
|
|
1884
1884
|
return itemsData.map((item, index) => {
|
|
1885
|
+
const itemKey = item.id || index;
|
|
1885
1886
|
const commonProps = {
|
|
1886
|
-
key: item.id || index,
|
|
1887
1887
|
disabled: item.disabled,
|
|
1888
1888
|
description: item.description,
|
|
1889
1889
|
"data-testid": `context-menu-item-${item.id || index}`
|
|
@@ -1897,7 +1897,8 @@ var ContextMenuRoot = (0, import_react11.forwardRef)(
|
|
|
1897
1897
|
onCheckedChange: (checked) => onCheckedChange?.(item.id, checked),
|
|
1898
1898
|
onPress: item.onPress,
|
|
1899
1899
|
children: item.label
|
|
1900
|
-
}
|
|
1900
|
+
},
|
|
1901
|
+
itemKey
|
|
1901
1902
|
);
|
|
1902
1903
|
}
|
|
1903
1904
|
if (item.variant === "radio") {
|
|
@@ -1908,7 +1909,8 @@ var ContextMenuRoot = (0, import_react11.forwardRef)(
|
|
|
1908
1909
|
value: item.id,
|
|
1909
1910
|
onPress: item.onPress,
|
|
1910
1911
|
children: item.label
|
|
1911
|
-
}
|
|
1912
|
+
},
|
|
1913
|
+
itemKey
|
|
1912
1914
|
);
|
|
1913
1915
|
}
|
|
1914
1916
|
return /* @__PURE__ */ (0, import_jsx_runtime396.jsx)(
|
|
@@ -1923,7 +1925,8 @@ var ContextMenuRoot = (0, import_react11.forwardRef)(
|
|
|
1923
1925
|
onPress: item.onPress,
|
|
1924
1926
|
active: activeIndex === index,
|
|
1925
1927
|
children: item.label
|
|
1926
|
-
}
|
|
1928
|
+
},
|
|
1929
|
+
itemKey
|
|
1927
1930
|
);
|
|
1928
1931
|
});
|
|
1929
1932
|
};
|