@autobest-ui/components 2.0.5-y.3 → 2.1.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.
@@ -58,7 +58,7 @@ export interface SelectProps extends Pick<TriggerProps, 'windowResizeHidden' | '
58
58
  */
59
59
  isMinRootWidth?: boolean;
60
60
  /**
61
- * 是否支持过滤功能, 目前的过滤类似carid.com,仅仅支持首字母过滤,滚动到匹配位置,填充匹配到的第一项,触发onChange
61
+ * 是否支持过滤功能, 目前的过滤类似carid.com,仅仅支持首字母过滤,滚动到匹配位置,填充匹配到的第一项,触发onFilterChange
62
62
  */
63
63
  isFilterOption?: boolean;
64
64
  /**
@@ -176,11 +176,12 @@ function (_super) {
176
176
 
177
177
  if (_this.props.isFilterOption && status) {
178
178
  _this.addKeydownListener();
179
- }
179
+ } // 关闭下拉框,并且已经过滤到数据
180
+
180
181
 
181
182
  var filterItem = _this.state.filterItem;
182
183
 
183
- if (filterItem) {
184
+ if (filterItem && !status) {
184
185
  // 清空filter数据,并触发onChange
185
186
  _this.setState({
186
187
  filterItem: null
@@ -58,7 +58,7 @@ export interface SelectProps extends Pick<TriggerProps, 'windowResizeHidden' | '
58
58
  */
59
59
  isMinRootWidth?: boolean;
60
60
  /**
61
- * 是否支持过滤功能, 目前的过滤类似carid.com,仅仅支持首字母过滤,滚动到匹配位置,填充匹配到的第一项,触发onChange
61
+ * 是否支持过滤功能, 目前的过滤类似carid.com,仅仅支持首字母过滤,滚动到匹配位置,填充匹配到的第一项,触发onFilterChange
62
62
  */
63
63
  isFilterOption?: boolean;
64
64
  /**
@@ -188,11 +188,12 @@ function (_super) {
188
188
 
189
189
  if (_this.props.isFilterOption && status) {
190
190
  _this.addKeydownListener();
191
- }
191
+ } // 关闭下拉框,并且已经过滤到数据
192
+
192
193
 
193
194
  var filterItem = _this.state.filterItem;
194
195
 
195
- if (filterItem) {
196
+ if (filterItem && !status) {
196
197
  // 清空filter数据,并触发onChange
197
198
  _this.setState({
198
199
  filterItem: null
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@autobest-ui/components",
3
- "version": "2.0.5-y.3",
3
+ "version": "2.1.0",
4
4
  "private": false,
5
5
  "description": "components common ui for React",
6
6
  "main": "lib/index.js",
@@ -46,5 +46,5 @@
46
46
  "react": ">=16.8.6",
47
47
  "react-transition-group": ">=4.2.2"
48
48
  },
49
- "gitHead": "ab861ea82f433ed53bfeda4219b72709186e9d5b"
49
+ "gitHead": "1d4466a308912ee7251003a834d85125654918f9"
50
50
  }