cloud-b2b 1.1.67 → 1.1.69
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.
|
@@ -74,14 +74,17 @@ var InputSearch = /*#__PURE__*/function (_React$Component) {
|
|
|
74
74
|
_classCallCheck(this, InputSearch);
|
|
75
75
|
_this = _super.call(this, _props);
|
|
76
76
|
_defineProperty(_assertThisInitialized(_this), "onSearch", function (value) {
|
|
77
|
-
|
|
78
|
-
value: value
|
|
79
|
-
});
|
|
77
|
+
// this.setState({value});
|
|
80
78
|
var _this$props = _this.props,
|
|
81
79
|
onSearch = _this$props.onSearch,
|
|
82
80
|
noSearchWhenTypo = _this$props.noSearchWhenTypo;
|
|
83
81
|
!noSearchWhenTypo && onSearch && onSearch(value);
|
|
84
82
|
});
|
|
83
|
+
_defineProperty(_assertThisInitialized(_this), "onChange", function (value) {
|
|
84
|
+
_this.setState({
|
|
85
|
+
value: value
|
|
86
|
+
});
|
|
87
|
+
});
|
|
85
88
|
_defineProperty(_assertThisInitialized(_this), "onBlur", function () {
|
|
86
89
|
var _this$props2 = _this.props,
|
|
87
90
|
_this$props2$autoAdd = _this$props2.autoAdd,
|
|
@@ -220,12 +223,13 @@ var InputSearch = /*#__PURE__*/function (_React$Component) {
|
|
|
220
223
|
value: _this.getValue(),
|
|
221
224
|
allowClear: true,
|
|
222
225
|
ref: inputRef,
|
|
223
|
-
onChange: _this.
|
|
226
|
+
onChange: _this.onChange,
|
|
227
|
+
onSearch: _this.onSearch,
|
|
228
|
+
onSelect: _this.onSelect,
|
|
229
|
+
onBlur: _this.onBlur,
|
|
224
230
|
filterOption: function filterOption(e, option) {
|
|
225
231
|
return option;
|
|
226
|
-
}
|
|
227
|
-
onSelect: _this.onSelect,
|
|
228
|
-
onBlur: _this.onBlur
|
|
232
|
+
}
|
|
229
233
|
});
|
|
230
234
|
if (_this.props.remark) {
|
|
231
235
|
props.dataSource = _this.getDataSourceRemark();
|
|
@@ -55,8 +55,8 @@ var InputSelect = /*#__PURE__*/function (_React$Component) {
|
|
|
55
55
|
value = _this$props$value === void 0 ? [] : _this$props$value,
|
|
56
56
|
_this$props$searchWhe = _this$props.searchWhenClick,
|
|
57
57
|
searchWhenClick = _this$props$searchWhe === void 0 ? false : _this$props$searchWhe;
|
|
58
|
-
|
|
59
|
-
|
|
58
|
+
if (onSearch && options.length <= value.length) {
|
|
59
|
+
// if (onSearch && searchWhenClick) {
|
|
60
60
|
onSearch(e.target.value);
|
|
61
61
|
}
|
|
62
62
|
});
|
|
@@ -82,14 +82,17 @@ var InputSearch = /*#__PURE__*/function (_React$Component) {
|
|
|
82
82
|
(0, _classCallCheck2["default"])(this, InputSearch);
|
|
83
83
|
_this = _super.call(this, _props);
|
|
84
84
|
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "onSearch", function (value) {
|
|
85
|
-
|
|
86
|
-
value: value
|
|
87
|
-
});
|
|
85
|
+
// this.setState({value});
|
|
88
86
|
var _this$props = _this.props,
|
|
89
87
|
onSearch = _this$props.onSearch,
|
|
90
88
|
noSearchWhenTypo = _this$props.noSearchWhenTypo;
|
|
91
89
|
!noSearchWhenTypo && onSearch && onSearch(value);
|
|
92
90
|
});
|
|
91
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "onChange", function (value) {
|
|
92
|
+
_this.setState({
|
|
93
|
+
value: value
|
|
94
|
+
});
|
|
95
|
+
});
|
|
93
96
|
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "onBlur", function () {
|
|
94
97
|
var _this$props2 = _this.props,
|
|
95
98
|
_this$props2$autoAdd = _this$props2.autoAdd,
|
|
@@ -228,12 +231,13 @@ var InputSearch = /*#__PURE__*/function (_React$Component) {
|
|
|
228
231
|
value: _this.getValue(),
|
|
229
232
|
allowClear: true,
|
|
230
233
|
ref: inputRef,
|
|
231
|
-
onChange: _this.
|
|
234
|
+
onChange: _this.onChange,
|
|
235
|
+
onSearch: _this.onSearch,
|
|
236
|
+
onSelect: _this.onSelect,
|
|
237
|
+
onBlur: _this.onBlur,
|
|
232
238
|
filterOption: function filterOption(e, option) {
|
|
233
239
|
return option;
|
|
234
|
-
}
|
|
235
|
-
onSelect: _this.onSelect,
|
|
236
|
-
onBlur: _this.onBlur
|
|
240
|
+
}
|
|
237
241
|
});
|
|
238
242
|
if (_this.props.remark) {
|
|
239
243
|
props.dataSource = _this.getDataSourceRemark();
|
|
@@ -63,8 +63,8 @@ var InputSelect = /*#__PURE__*/function (_React$Component) {
|
|
|
63
63
|
value = _this$props$value === void 0 ? [] : _this$props$value,
|
|
64
64
|
_this$props$searchWhe = _this$props.searchWhenClick,
|
|
65
65
|
searchWhenClick = _this$props$searchWhe === void 0 ? false : _this$props$searchWhe;
|
|
66
|
-
|
|
67
|
-
|
|
66
|
+
if (onSearch && options.length <= value.length) {
|
|
67
|
+
// if (onSearch && searchWhenClick) {
|
|
68
68
|
onSearch(e.target.value);
|
|
69
69
|
}
|
|
70
70
|
});
|