@sheinx/base 3.9.2-beta.2 → 3.9.2-beta.4
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/cjs/select/select.d.ts.map +1 -1
- package/cjs/select/select.js +3 -3
- package/cjs/select/select.type.d.ts +1 -1
- package/cjs/tree-select/tree-select.js +1 -1
- package/cjs/tree-select/tree-select.type.d.ts +1 -1
- package/esm/select/select.d.ts.map +1 -1
- package/esm/select/select.js +3 -3
- package/esm/select/select.type.d.ts +1 -1
- package/esm/tree-select/tree-select.js +1 -1
- package/esm/tree-select/tree-select.type.d.ts +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select.d.ts","sourceRoot":"","sources":["select.tsx"],"names":[],"mappings":"AAgBA,OAAO,EAAE,eAAe,EAAqB,MAAM,eAAe,CAAC;AAenE,iBAAS,MAAM,CAAC,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,eAAe,CAAC,QAAQ,EAAE,KAAK,CAAC,
|
|
1
|
+
{"version":3,"file":"select.d.ts","sourceRoot":"","sources":["select.tsx"],"names":[],"mappings":"AAgBA,OAAO,EAAE,eAAe,EAAqB,MAAM,eAAe,CAAC;AAenE,iBAAS,MAAM,CAAC,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,eAAe,CAAC,QAAQ,EAAE,KAAK,CAAC,2CA4xBxE;AAED,eAAe,MAAM,CAAC"}
|
package/cjs/select/select.js
CHANGED
|
@@ -69,7 +69,8 @@ function Select(props0) {
|
|
|
69
69
|
_props$columnWidth = props.columnWidth,
|
|
70
70
|
columnWidth = _props$columnWidth === void 0 ? 160 : _props$columnWidth,
|
|
71
71
|
width = props.width,
|
|
72
|
-
trim = props.trim,
|
|
72
|
+
_props$trim = props.trim,
|
|
73
|
+
trim = _props$trim === void 0 ? true : _props$trim,
|
|
73
74
|
maxLength = props.maxLength,
|
|
74
75
|
style = props.style,
|
|
75
76
|
reFocus = props.reFocus,
|
|
@@ -401,8 +402,7 @@ function Select(props0) {
|
|
|
401
402
|
if (hideCreate) {
|
|
402
403
|
// optionListRef.current?.hoverMove(filterData.length - 1, true);
|
|
403
404
|
}
|
|
404
|
-
|
|
405
|
-
onFilter === null || onFilter === void 0 || onFilter(text.trim(), from);
|
|
405
|
+
onFilter === null || onFilter === void 0 || onFilter(trim ? text.trim() : text, from);
|
|
406
406
|
};
|
|
407
407
|
var handleOptionClick = function handleOptionClick() {
|
|
408
408
|
if (multiple) return;
|
|
@@ -320,7 +320,7 @@ export interface SelectPropsBase<DataItem, Value> extends Omit<BaseSelectProps<D
|
|
|
320
320
|
/**
|
|
321
321
|
* @en Automatically removes leading/trailing whitespace from input on blur
|
|
322
322
|
* @cn 失去焦点时自动删除输入内容的首尾空白字符
|
|
323
|
-
* @default
|
|
323
|
+
* @default true
|
|
324
324
|
* @when For cleaner data when users may accidentally input spaces
|
|
325
325
|
*/
|
|
326
326
|
trim?: boolean;
|
|
@@ -90,7 +90,7 @@ var TreeSelect = function TreeSelect(props0) {
|
|
|
90
90
|
return d;
|
|
91
91
|
} : _props$renderItem,
|
|
92
92
|
_props$trim = props.trim,
|
|
93
|
-
trim = _props$trim === void 0 ?
|
|
93
|
+
trim = _props$trim === void 0 ? true : _props$trim,
|
|
94
94
|
placeholder = props.placeholder,
|
|
95
95
|
renderUnmatched = props.renderUnmatched,
|
|
96
96
|
resultClassName = props.resultClassName,
|
|
@@ -377,7 +377,7 @@ export interface TreeSelectProps<DataItem, Value> extends Pick<CommonType, 'clas
|
|
|
377
377
|
/**
|
|
378
378
|
* @en When trim is true, blank characters are automatically deleted when lose focus
|
|
379
379
|
* @cn trim 为 true 时,失去焦点时会自动删除空白字符
|
|
380
|
-
* @default
|
|
380
|
+
* @default true
|
|
381
381
|
*/
|
|
382
382
|
trim?: boolean;
|
|
383
383
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select.d.ts","sourceRoot":"","sources":["select.tsx"],"names":[],"mappings":"AAgBA,OAAO,EAAE,eAAe,EAAqB,MAAM,eAAe,CAAC;AAenE,iBAAS,MAAM,CAAC,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,eAAe,CAAC,QAAQ,EAAE,KAAK,CAAC,
|
|
1
|
+
{"version":3,"file":"select.d.ts","sourceRoot":"","sources":["select.tsx"],"names":[],"mappings":"AAgBA,OAAO,EAAE,eAAe,EAAqB,MAAM,eAAe,CAAC;AAenE,iBAAS,MAAM,CAAC,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,eAAe,CAAC,QAAQ,EAAE,KAAK,CAAC,2CA4xBxE;AAED,eAAe,MAAM,CAAC"}
|
package/esm/select/select.js
CHANGED
|
@@ -62,7 +62,8 @@ function Select(props0) {
|
|
|
62
62
|
_props$columnWidth = props.columnWidth,
|
|
63
63
|
columnWidth = _props$columnWidth === void 0 ? 160 : _props$columnWidth,
|
|
64
64
|
width = props.width,
|
|
65
|
-
trim = props.trim,
|
|
65
|
+
_props$trim = props.trim,
|
|
66
|
+
trim = _props$trim === void 0 ? true : _props$trim,
|
|
66
67
|
maxLength = props.maxLength,
|
|
67
68
|
style = props.style,
|
|
68
69
|
reFocus = props.reFocus,
|
|
@@ -394,8 +395,7 @@ function Select(props0) {
|
|
|
394
395
|
if (hideCreate) {
|
|
395
396
|
// optionListRef.current?.hoverMove(filterData.length - 1, true);
|
|
396
397
|
}
|
|
397
|
-
|
|
398
|
-
onFilter === null || onFilter === void 0 || onFilter(text.trim(), from);
|
|
398
|
+
onFilter === null || onFilter === void 0 || onFilter(trim ? text.trim() : text, from);
|
|
399
399
|
};
|
|
400
400
|
var handleOptionClick = function handleOptionClick() {
|
|
401
401
|
if (multiple) return;
|
|
@@ -320,7 +320,7 @@ export interface SelectPropsBase<DataItem, Value> extends Omit<BaseSelectProps<D
|
|
|
320
320
|
/**
|
|
321
321
|
* @en Automatically removes leading/trailing whitespace from input on blur
|
|
322
322
|
* @cn 失去焦点时自动删除输入内容的首尾空白字符
|
|
323
|
-
* @default
|
|
323
|
+
* @default true
|
|
324
324
|
* @when For cleaner data when users may accidentally input spaces
|
|
325
325
|
*/
|
|
326
326
|
trim?: boolean;
|
|
@@ -83,7 +83,7 @@ var TreeSelect = function TreeSelect(props0) {
|
|
|
83
83
|
return d;
|
|
84
84
|
} : _props$renderItem,
|
|
85
85
|
_props$trim = props.trim,
|
|
86
|
-
trim = _props$trim === void 0 ?
|
|
86
|
+
trim = _props$trim === void 0 ? true : _props$trim,
|
|
87
87
|
placeholder = props.placeholder,
|
|
88
88
|
renderUnmatched = props.renderUnmatched,
|
|
89
89
|
resultClassName = props.resultClassName,
|
|
@@ -377,7 +377,7 @@ export interface TreeSelectProps<DataItem, Value> extends Pick<CommonType, 'clas
|
|
|
377
377
|
/**
|
|
378
378
|
* @en When trim is true, blank characters are automatically deleted when lose focus
|
|
379
379
|
* @cn trim 为 true 时,失去焦点时会自动删除空白字符
|
|
380
|
-
* @default
|
|
380
|
+
* @default true
|
|
381
381
|
*/
|
|
382
382
|
trim?: boolean;
|
|
383
383
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sheinx/base",
|
|
3
|
-
"version": "3.9.2-beta.
|
|
3
|
+
"version": "3.9.2-beta.4",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"license": "MIT",
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"module": "./esm/index.js",
|
|
11
11
|
"typings": "./cjs/index.d.ts",
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@sheinx/hooks": "3.9.2-beta.
|
|
13
|
+
"@sheinx/hooks": "3.9.2-beta.4",
|
|
14
14
|
"immer": "^10.0.0",
|
|
15
15
|
"classnames": "^2.0.0",
|
|
16
16
|
"@shined/reactive": "^0.3.3"
|