@linzjs/lui 23.14.0 → 23.14.1

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.1](https://github.com/linz/lui/compare/v23.14.0...v23.14.1) (2025-10-13)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **LuiSearchInput:** CS-8444 tighten up logic in useEffect. ([#1258](https://github.com/linz/lui/issues/1258)) ([c238f5d](https://github.com/linz/lui/commit/c238f5d1e3419474b35fe3a528171a01ceff3983))
7
+
1
8
  # [23.14.0](https://github.com/linz/lui/compare/v23.13.1...v23.14.0) (2025-10-13)
2
9
 
3
10
 
package/dist/index.js CHANGED
@@ -17856,13 +17856,15 @@ var LuiSearchInput = function (props) {
17856
17856
  (_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.focus();
17857
17857
  }, [props.focusUpdate]);
17858
17858
  React.useEffect(function () {
17859
- //if there is a filter under way, recalculate the results
17860
- if (props.filterElement) {
17859
+ // if the way of getOptions changes, then the current results (options) are no longer applicable
17860
+ if (haveFocus &&
17861
+ typedValue &&
17862
+ typedValue.length >= props.minCharactersForSearch) {
17861
17863
  retrieveResults(typedValue);
17862
- return;
17863
17864
  }
17864
- //if there is not a filter under way, then the results are no longer valid, clear them
17865
- setResults([]);
17865
+ else {
17866
+ setResults([]);
17867
+ }
17866
17868
  }, [props.getOptions]);
17867
17869
  React.useEffect(function () {
17868
17870
  if (props.externalSearch) {