@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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xsolla/xui-context-menu",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.72.0",
|
|
4
4
|
"main": "./web/index.js",
|
|
5
5
|
"module": "./web/index.mjs",
|
|
6
6
|
"types": "./web/index.d.ts",
|
|
@@ -13,13 +13,13 @@
|
|
|
13
13
|
"test:coverage": "vitest run --coverage"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@xsolla/xui-checkbox": "0.
|
|
17
|
-
"@xsolla/xui-core": "0.
|
|
18
|
-
"@xsolla/xui-divider": "0.
|
|
19
|
-
"@xsolla/xui-icons": "0.
|
|
20
|
-
"@xsolla/xui-primitives-core": "0.
|
|
21
|
-
"@xsolla/xui-radio": "0.
|
|
22
|
-
"@xsolla/xui-spinner": "0.
|
|
16
|
+
"@xsolla/xui-checkbox": "0.72.0",
|
|
17
|
+
"@xsolla/xui-core": "0.72.0",
|
|
18
|
+
"@xsolla/xui-divider": "0.72.0",
|
|
19
|
+
"@xsolla/xui-icons": "0.72.0",
|
|
20
|
+
"@xsolla/xui-primitives-core": "0.72.0",
|
|
21
|
+
"@xsolla/xui-radio": "0.72.0",
|
|
22
|
+
"@xsolla/xui-spinner": "0.72.0"
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
25
25
|
"react": ">=16.8.0",
|
package/web/index.js
CHANGED
|
@@ -1854,8 +1854,8 @@ var ContextMenuRoot = (0, import_react11.forwardRef)(
|
|
|
1854
1854
|
};
|
|
1855
1855
|
const renderItems = (itemsData) => {
|
|
1856
1856
|
return itemsData.map((item, index) => {
|
|
1857
|
+
const itemKey = item.id || index;
|
|
1857
1858
|
const commonProps = {
|
|
1858
|
-
key: item.id || index,
|
|
1859
1859
|
disabled: item.disabled,
|
|
1860
1860
|
description: item.description,
|
|
1861
1861
|
"data-testid": `context-menu-item-${item.id || index}`
|
|
@@ -1869,7 +1869,8 @@ var ContextMenuRoot = (0, import_react11.forwardRef)(
|
|
|
1869
1869
|
onCheckedChange: (checked) => onCheckedChange?.(item.id, checked),
|
|
1870
1870
|
onPress: item.onPress,
|
|
1871
1871
|
children: item.label
|
|
1872
|
-
}
|
|
1872
|
+
},
|
|
1873
|
+
itemKey
|
|
1873
1874
|
);
|
|
1874
1875
|
}
|
|
1875
1876
|
if (item.variant === "radio") {
|
|
@@ -1880,7 +1881,8 @@ var ContextMenuRoot = (0, import_react11.forwardRef)(
|
|
|
1880
1881
|
value: item.id,
|
|
1881
1882
|
onPress: item.onPress,
|
|
1882
1883
|
children: item.label
|
|
1883
|
-
}
|
|
1884
|
+
},
|
|
1885
|
+
itemKey
|
|
1884
1886
|
);
|
|
1885
1887
|
}
|
|
1886
1888
|
return /* @__PURE__ */ (0, import_jsx_runtime396.jsx)(
|
|
@@ -1895,7 +1897,8 @@ var ContextMenuRoot = (0, import_react11.forwardRef)(
|
|
|
1895
1897
|
onPress: item.onPress,
|
|
1896
1898
|
active: activeIndex === index,
|
|
1897
1899
|
children: item.label
|
|
1898
|
-
}
|
|
1900
|
+
},
|
|
1901
|
+
itemKey
|
|
1899
1902
|
);
|
|
1900
1903
|
});
|
|
1901
1904
|
};
|