@douyinfe/semi-foundation 2.38.3-alpha.2-patch-2254 → 2.38.3-alpha.2-patch-select-max
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/lib/cjs/overflowList/constants.d.ts +1 -1
- package/lib/cjs/select/foundation.js +1 -1
- package/lib/cjs/tree/treeUtil.d.ts +1 -1
- package/lib/es/overflowList/constants.d.ts +1 -1
- package/lib/es/select/foundation.js +1 -1
- package/lib/es/tree/treeUtil.d.ts +1 -1
- package/package.json +3 -3
- package/select/foundation.ts +1 -1
|
@@ -439,7 +439,7 @@ class SelectFoundation extends _foundation.default {
|
|
|
439
439
|
label
|
|
440
440
|
}, rest));
|
|
441
441
|
selections.delete(label);
|
|
442
|
-
} else if (maxLimit && selections.size
|
|
442
|
+
} else if (maxLimit && selections.size >= maxLimit) {
|
|
443
443
|
this._adapter.notifyMaxLimit(Object.assign({
|
|
444
444
|
value,
|
|
445
445
|
label
|
|
@@ -75,6 +75,6 @@ export declare function getValueOrKey(data: any): any;
|
|
|
75
75
|
export declare function normalizeValue(value: any, withObject: boolean): any;
|
|
76
76
|
export declare function updateKeys(keySet: Set<string> | string[], keyEntities: KeyEntities): string[];
|
|
77
77
|
export declare function calcDisabledKeys(keyEntities: KeyEntities): Set<string>;
|
|
78
|
-
export declare function calcDropRelativePosition(event: any, treeNode: any):
|
|
78
|
+
export declare function calcDropRelativePosition(event: any, treeNode: any): 1 | -1 | 0;
|
|
79
79
|
export declare function getDragNodesKeys(key: string, keyEntities: KeyEntities): string[];
|
|
80
80
|
export declare function calcDropActualPosition(pos: string, relativeDropPos: any): any;
|
|
@@ -430,7 +430,7 @@ export default class SelectFoundation extends BaseFoundation {
|
|
|
430
430
|
label
|
|
431
431
|
}, rest));
|
|
432
432
|
selections.delete(label);
|
|
433
|
-
} else if (maxLimit && selections.size
|
|
433
|
+
} else if (maxLimit && selections.size >= maxLimit) {
|
|
434
434
|
this._adapter.notifyMaxLimit(Object.assign({
|
|
435
435
|
value,
|
|
436
436
|
label
|
|
@@ -75,6 +75,6 @@ export declare function getValueOrKey(data: any): any;
|
|
|
75
75
|
export declare function normalizeValue(value: any, withObject: boolean): any;
|
|
76
76
|
export declare function updateKeys(keySet: Set<string> | string[], keyEntities: KeyEntities): string[];
|
|
77
77
|
export declare function calcDisabledKeys(keyEntities: KeyEntities): Set<string>;
|
|
78
|
-
export declare function calcDropRelativePosition(event: any, treeNode: any):
|
|
78
|
+
export declare function calcDropRelativePosition(event: any, treeNode: any): 1 | -1 | 0;
|
|
79
79
|
export declare function getDragNodesKeys(key: string, keyEntities: KeyEntities): string[];
|
|
80
80
|
export declare function calcDropActualPosition(pos: string, relativeDropPos: any): any;
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@douyinfe/semi-foundation",
|
|
3
|
-
"version": "2.38.3-alpha.2-patch-
|
|
3
|
+
"version": "2.38.3-alpha.2-patch-select-max",
|
|
4
4
|
"description": "",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build:lib": "node ./scripts/compileLib.js",
|
|
7
7
|
"prepublishOnly": "npm run build:lib"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@douyinfe/semi-animation": "2.38.3-alpha.2-patch-
|
|
10
|
+
"@douyinfe/semi-animation": "2.38.3-alpha.2-patch-select-max",
|
|
11
11
|
"async-validator": "^3.5.0",
|
|
12
12
|
"classnames": "^2.2.6",
|
|
13
13
|
"date-fns": "^2.29.3",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"*.scss",
|
|
24
24
|
"*.css"
|
|
25
25
|
],
|
|
26
|
-
"gitHead": "
|
|
26
|
+
"gitHead": "8728fb091f1dfcae5d64d6ef912493b0911a1de7",
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@babel/plugin-transform-runtime": "^7.15.8",
|
|
29
29
|
"@babel/preset-env": "^7.15.8",
|
package/select/foundation.ts
CHANGED
|
@@ -455,7 +455,7 @@ export default class SelectFoundation extends BaseFoundation<SelectAdapter> {
|
|
|
455
455
|
if (selections.has(label)) {
|
|
456
456
|
this._notifyDeselect(value, { value, label, ...rest });
|
|
457
457
|
selections.delete(label);
|
|
458
|
-
} else if (maxLimit && selections.size
|
|
458
|
+
} else if (maxLimit && selections.size >= maxLimit) {
|
|
459
459
|
this._adapter.notifyMaxLimit({ value, label, ...omit(rest, '_scrollIndex') });
|
|
460
460
|
return;
|
|
461
461
|
} else {
|