@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/prod.js CHANGED
@@ -45434,7 +45434,8 @@ function USearchBox(_ref) {
45434
45434
  className = _ref.className,
45435
45435
  showSeparator = _ref.showSeparator,
45436
45436
  iconLabel = _ref.iconLabel,
45437
- rest = objectWithoutProperties(_ref, ['value', 'onSearch', 'placeholder', 'inputProps', 'className', 'showSeparator', 'iconLabel']);
45437
+ onChange = _ref.onChange,
45438
+ rest = objectWithoutProperties(_ref, ['value', 'onSearch', 'placeholder', 'inputProps', 'className', 'showSeparator', 'iconLabel', 'onChange']);
45438
45439
 
45439
45440
  var _useState = React.useState(value),
45440
45441
  _useState2 = slicedToArray(_useState, 2),
@@ -45448,7 +45449,9 @@ function USearchBox(_ref) {
45448
45449
  }, [value]);
45449
45450
 
45450
45451
  var handleChange = function handleChange(event) {
45451
- setSearch(event.target.value);
45452
+ var value = event.target.value;
45453
+ setSearch(value);
45454
+ onChange && onChange(value);
45452
45455
  };
45453
45456
 
45454
45457
  var applySearch = function applySearch(val) {
@@ -45530,7 +45533,9 @@ USearchBox.propTypes = {
45530
45533
  /** Show a vertical separator between the text field and search icon */
45531
45534
  showSeparator: PropTypes__default.bool,
45532
45535
  /** Label next to the search icon */
45533
- iconLabel: PropTypes__default.string
45536
+ iconLabel: PropTypes__default.string,
45537
+ /** Callback function when change the search text */
45538
+ onchange: PropTypes__default.func
45534
45539
  };
45535
45540
 
45536
45541
  USearchBox.defaultProps = {