@linzjs/lui 17.5.1 → 17.5.2

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/dist/lui.esm.js CHANGED
@@ -55882,6 +55882,10 @@ var LuiSearchInput = function (props) {
55882
55882
  var _e = useState(false), isLoading = _e[0], setIsLoading = _e[1];
55883
55883
  var inputRef = useRef(null);
55884
55884
  var selectedRef = useRef(null);
55885
+ //clear result after search types changed
55886
+ useEffect(function () {
55887
+ setResults([]);
55888
+ }, [props.getOptions]);
55885
55889
  function setInputValue(value) {
55886
55890
  setTypedValue(props.inputTransformer ? props.inputTransformer(value) : value);
55887
55891
  }
@@ -56020,6 +56024,7 @@ var LuiSearchInput = function (props) {
56020
56024
  props.name &&
56021
56025
  haveFocus &&
56022
56026
  results.length === 0 &&
56027
+ !isLoading &&
56023
56028
  noOptionsMessage(typedValue) && (React__default.createElement(React__default.Fragment, null,
56024
56029
  React__default.createElement("hr", { className: "LuiSearchInput-resultSeparator" }),
56025
56030
  React__default.createElement("div", { "data-testid": "no-result-msg", className: "LuiSearchInput-disclaimer" }, noOptionsMessage(typedValue)))),