@happeouikit/form-elements 2.3.17 → 2.3.19

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/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 2.3.18
4
+
5
+ - [Renamed] Typeahead prop `afterSelect` to `onSelect`
6
+
3
7
  ## 2.3.17
4
8
 
5
9
  - [Added] Add `autoHeight` and `maxHeight` properties to textarea.
@@ -17,7 +17,7 @@ var Typeahead = function Typeahead(_ref) {
17
17
  var onQuery = _ref.onQuery,
18
18
  loading = _ref.loading,
19
19
  results = _ref.results,
20
- afterSelect = _ref.afterSelect,
20
+ onSelect = _ref.onSelect,
21
21
  keepResult = _ref.keepResult,
22
22
  placeholder = _ref.placeholder,
23
23
  errorMessage = _ref.errorMessage,
@@ -97,7 +97,7 @@ var Typeahead = function Typeahead(_ref) {
97
97
  }
98
98
 
99
99
  setSelectedResult(result);
100
- afterSelect(result);
100
+ onSelect(result);
101
101
  setFocusedResultIndex(null);
102
102
  };
103
103
 
@@ -111,7 +111,7 @@ var Typeahead = function Typeahead(_ref) {
111
111
  setFocusedResultIndex(null); // notify parent that selection was erased
112
112
 
113
113
  if (selectedResult) {
114
- afterSelect(null);
114
+ onSelect(null);
115
115
  }
116
116
  };
117
117
 
@@ -214,10 +214,10 @@ Typeahead.propTypes = {
214
214
  text: PropTypes.string,
215
215
  // This is used in association with keepResult
216
216
  component: PropTypes.element.isRequired,
217
- data: PropTypes.shape // You may add any data related to the result, so you can use it on afterSelect
217
+ data: PropTypes.shape // You may add any data related to the result, so you can use it on onSelect
218
218
 
219
219
  })).isRequired,
220
- afterSelect: PropTypes.func.isRequired,
220
+ onSelect: PropTypes.func.isRequired,
221
221
  keepResult: PropTypes.bool,
222
222
  placeholder: PropTypes.string,
223
223
  errorMessage: PropTypes.string,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@happeouikit/form-elements",
3
- "version": "2.3.17",
3
+ "version": "2.3.19",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "module": "src/index.js",
@@ -45,5 +45,5 @@
45
45
  "publishConfig": {
46
46
  "access": "public"
47
47
  },
48
- "gitHead": "f2782af0f34d915128c836831456ed9cf9c7b090"
48
+ "gitHead": "2525dd4ccc5ece89512fe8900af51d19e7f0aa96"
49
49
  }