@xsolla/xui-multi-select 0.70.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 -3
- package/native/index.js.map +1 -1
- package/native/index.mjs +13 -4
- package/native/index.mjs.map +1 -1
- package/package.json +5 -5
- package/web/index.js +7 -3
- package/web/index.js.map +1 -1
- package/web/index.mjs +13 -4
- package/web/index.mjs.map +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xsolla/xui-multi-select",
|
|
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",
|
|
@@ -10,10 +10,10 @@
|
|
|
10
10
|
"build:native": "PLATFORM=native tsup"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@xsolla/xui-checkbox": "0.
|
|
14
|
-
"@xsolla/xui-core": "0.
|
|
15
|
-
"@xsolla/xui-dropdown": "0.
|
|
16
|
-
"@xsolla/xui-primitives-core": "0.
|
|
13
|
+
"@xsolla/xui-checkbox": "0.72.0",
|
|
14
|
+
"@xsolla/xui-core": "0.72.0",
|
|
15
|
+
"@xsolla/xui-dropdown": "0.72.0",
|
|
16
|
+
"@xsolla/xui-primitives-core": "0.72.0"
|
|
17
17
|
},
|
|
18
18
|
"peerDependencies": {
|
|
19
19
|
"react": ">=16.8.0",
|
package/web/index.js
CHANGED
|
@@ -1979,7 +1979,9 @@ var useMultiSelectControl = ({
|
|
|
1979
1979
|
const savedWidthsRef = (0, import_react12.useRef)(null);
|
|
1980
1980
|
const itemsRef = (0, import_react12.useRef)(null);
|
|
1981
1981
|
const [itemsWidth, setItemsWidth] = (0, import_react12.useState)(0);
|
|
1982
|
-
const [selectedContent, setSelectedContent] = (0, import_react12.useState)(
|
|
1982
|
+
const [selectedContent, setSelectedContent] = (0, import_react12.useState)(
|
|
1983
|
+
null
|
|
1984
|
+
);
|
|
1983
1985
|
const isPlaceholder = !selectedItems || selectedItems.length === 0;
|
|
1984
1986
|
(0, import_react12.useEffect)(() => {
|
|
1985
1987
|
if (!containerRef.current) return;
|
|
@@ -2005,8 +2007,10 @@ var useMultiSelectControl = ({
|
|
|
2005
2007
|
if (!prev) return true;
|
|
2006
2008
|
if (prev.variant !== widthsDependencies.variant) return true;
|
|
2007
2009
|
if (prev.size !== widthsDependencies.size) return true;
|
|
2008
|
-
if (prev.removeTagsButtons !== widthsDependencies.removeTagsButtons)
|
|
2009
|
-
|
|
2010
|
+
if (prev.removeTagsButtons !== widthsDependencies.removeTagsButtons)
|
|
2011
|
+
return true;
|
|
2012
|
+
if (prev.stateList.length !== widthsDependencies.stateList.length)
|
|
2013
|
+
return true;
|
|
2010
2014
|
let i = 0;
|
|
2011
2015
|
for (const v of prev.stateList) {
|
|
2012
2016
|
if (v !== widthsDependencies.stateList[i]) return true;
|