blue-react 8.3.0 → 8.3.3

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.
@@ -119,6 +119,7 @@ function MenuItem(props) {
119
119
 
120
120
  return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/(0, _react.createElement)(props.elementType || (props.href ? "a" : "button"), {
121
121
  to: props.to,
122
+ href: props.href,
122
123
  exact: props.exact,
123
124
  className: className + (props.isActive || active ? " active" : "") + (props.label ? " has-label" : ""),
124
125
  onClick: onClick,
@@ -44,9 +44,10 @@ function Search(props) {
44
44
  placeholder = props.placeholder,
45
45
  reset = props.reset,
46
46
  resetIcon = props.resetIcon,
47
- sidebar = props.sidebar;
47
+ sidebar = props.sidebar,
48
+ id = props.id;
48
49
 
49
- var SearchControlId = "blue-search-control-" + _Utilities.default.guid();
50
+ var SearchControlId = id || "blue-search-control-" + _Utilities.default.guid();
50
51
 
51
52
  var _useState = (0, _react.useState)(props.value || ""),
52
53
  _useState2 = _slicedToArray(_useState, 2),
@@ -64,6 +65,9 @@ function Search(props) {
64
65
  }
65
66
  };
66
67
 
68
+ (0, _react.useEffect)(function () {
69
+ if (props.value) setValue(props.value);
70
+ }, [props.value]);
67
71
  return /*#__PURE__*/_react.default.createElement("form", {
68
72
  className: "blue-search " + (body ? "blue-search-body " : "") + (focus ? "focus " : "") + (sidebar ? "blue-search-sidebar " : "") + className,
69
73
  onSubmit: function onSubmit(event) {
@@ -93,7 +97,7 @@ function Search(props) {
93
97
  }), /*#__PURE__*/_react.default.createElement("path", {
94
98
  fillRule: "evenodd",
95
99
  d: "M6.5 12a5.5 5.5 0 1 0 0-11 5.5 5.5 0 0 0 0 11zM13 6.5a6.5 6.5 0 1 1-13 0 6.5 6.5 0 0 1 13 0z"
96
- })))), /*#__PURE__*/_react.default.createElement("input", {
100
+ })))), props.children || /*#__PURE__*/_react.default.createElement("input", {
97
101
  type: "search",
98
102
  value: value,
99
103
  onChange: function onChange(event) {