@linzjs/lui 23.14.3 → 23.14.4

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,3 +1,10 @@
1
+ ## [23.14.4](https://github.com/linz/lui/compare/v23.14.3...v23.14.4) (2025-10-27)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **SearchInput:** CS8444 - show filter when no result ([#1264](https://github.com/linz/lui/issues/1264)) ([0edcaad](https://github.com/linz/lui/commit/0edcaad78c8a6bc316306e12a66440bfb40593d9))
7
+
1
8
  ## [23.14.3](https://github.com/linz/lui/compare/v23.14.2...v23.14.3) (2025-10-22)
2
9
 
3
10
 
@@ -11,4 +11,4 @@ import { MutableRefObject, RefObject } from 'react';
11
11
  return <button ref={refElement}>Click Me!</button>;
12
12
  ```
13
13
  */
14
- export declare function useClickedOutsideElement(refElement: RefObject<HTMLElement> | MutableRefObject<HTMLElement>, handleClickOutside: CallableFunction): void;
14
+ export declare function useClickedOutsideElement(refElement: RefObject<HTMLElement | null> | MutableRefObject<HTMLElement | null>, handleClickOutside: CallableFunction): void;
package/dist/index.js CHANGED
@@ -18018,7 +18018,14 @@ var LuiSearchInput = function (props) {
18018
18018
  }
18019
18019
  var filterRef = React.useRef(null);
18020
18020
  function determineFilterElement() {
18021
- if (props.filterElement && haveFocus && results.length > 0) {
18021
+ var showingResults = results.length > 0;
18022
+ var showingNoResults = enoughChars(typedValue) &&
18023
+ results.length === 0 &&
18024
+ !isLoading &&
18025
+ props.hideNoOptionsMessage !== true;
18026
+ if (props.filterElement &&
18027
+ haveFocus &&
18028
+ (showingResults || showingNoResults)) {
18022
18029
  return (React__default["default"].createElement(React__default["default"].Fragment, null,
18023
18030
  React__default["default"].createElement("hr", { className: "LuiSearchInput-resultSeparator" }),
18024
18031
  React__default["default"].createElement("div", { ref: filterRef, tabIndex: -1, "data-testid": "filter", className: "LuiSearchInput-filter" }, props.filterElement)));