@gm-mobile/react 1.1.6-alpha.0 → 1.1.6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gm-mobile/react",
3
- "version": "1.1.6-alpha.0",
3
+ "version": "1.1.6",
4
4
  "description": "",
5
5
  "author": "liyatang <liyatang@qq.com>",
6
6
  "homepage": "https://github.com/gmfe/gm-mobile#readme",
@@ -27,8 +27,8 @@
27
27
  "dependencies": {
28
28
  "@gm-common/number": "^2.2.9",
29
29
  "@gm-common/tool": "^2.2.9",
30
- "@gm-mobile/locales": "^1.1.6-alpha.0",
30
+ "@gm-mobile/locales": "^1.1.6",
31
31
  "classnames": "^2.2.6"
32
32
  },
33
- "gitHead": "3d35534dc4d2703c7da0d187471e4e2e52ac9f21"
33
+ "gitHead": "986c6402ca51357b144807b533a6575371602783"
34
34
  }
@@ -18,6 +18,7 @@ class SearchPicker extends React.Component {
18
18
  this.state = {
19
19
  datas: data.length ? [data] : [],
20
20
  values: selectedItem ? [selectedItem.value] : [data[0].value],
21
+ searchValue: '',
21
22
  }
22
23
  }
23
24
 
@@ -28,6 +29,7 @@ class SearchPicker extends React.Component {
28
29
  this.setState({
29
30
  datas: searchData.length ? [searchData] : [],
30
31
  values: [searchData[0]] || [],
32
+ searchValue: value,
31
33
  })
32
34
  }
33
35
 
@@ -37,17 +39,19 @@ class SearchPicker extends React.Component {
37
39
  })
38
40
  }
39
41
 
40
- handleConfirm = (e) => {
42
+ handleConfirm = () => {
41
43
  this.props.onConfirm(this.state.values)
42
44
  }
43
45
 
44
46
  render() {
45
47
  const { headers, placeholder, searchBtnText, renderOption } = this.props
46
- const { datas, values } = this.state
48
+ const { datas, values, searchValue } = this.state
47
49
 
48
50
  return (
49
51
  <div>
50
52
  <Search
53
+ type='cancel'
54
+ value={searchValue}
51
55
  placeholder={placeholder}
52
56
  searchText={searchBtnText}
53
57
  onChange={this.handleSearch}