@unicef/material-ui 0.12.5 → 0.12.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/lib/dev.js CHANGED
@@ -53126,7 +53126,8 @@ function USearchBox(_ref) {
53126
53126
  className = _ref.className,
53127
53127
  showSeparator = _ref.showSeparator,
53128
53128
  iconLabel = _ref.iconLabel,
53129
- rest = objectWithoutProperties(_ref, ['value', 'onSearch', 'placeholder', 'inputProps', 'className', 'showSeparator', 'iconLabel']);
53129
+ onChange = _ref.onChange,
53130
+ rest = objectWithoutProperties(_ref, ['value', 'onSearch', 'placeholder', 'inputProps', 'className', 'showSeparator', 'iconLabel', 'onChange']);
53130
53131
 
53131
53132
  var _useState = React.useState(value),
53132
53133
  _useState2 = slicedToArray(_useState, 2),
@@ -53140,7 +53141,9 @@ function USearchBox(_ref) {
53140
53141
  }, [value]);
53141
53142
 
53142
53143
  var handleChange = function handleChange(event) {
53143
- setSearch(event.target.value);
53144
+ var value = event.target.value;
53145
+ setSearch(value);
53146
+ onChange && onChange(value);
53144
53147
  };
53145
53148
 
53146
53149
  var applySearch = function applySearch(val) {
@@ -53222,7 +53225,9 @@ USearchBox.propTypes = {
53222
53225
  /** Show a vertical separator between the text field and search icon */
53223
53226
  showSeparator: PropTypes__default.bool,
53224
53227
  /** Label next to the search icon */
53225
- iconLabel: PropTypes__default.string
53228
+ iconLabel: PropTypes__default.string,
53229
+ /** Callback function when change the search text */
53230
+ onchange: PropTypes__default.func
53226
53231
  };
53227
53232
 
53228
53233
  USearchBox.defaultProps = {