@linzjs/lui 24.5.0 → 24.6.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/dist/lui.esm.js CHANGED
@@ -7105,16 +7105,16 @@ function useFilterCharacters() {
7105
7105
  return useContext(LuiFilterCharactersContext);
7106
7106
  }
7107
7107
  var LuiFilterCharactersProvider = function (_a) {
7108
- var children = _a.children, filterFunction = _a.filterFunction;
7108
+ var children = _a.children, filterFunction = _a.filterFunction, _b = _a.enabled, enabled = _b === void 0 ? true : _b;
7109
7109
  var filterCharacters = useCallback(function (input) {
7110
- if (input === undefined) {
7110
+ if (input === undefined || !enabled) {
7111
7111
  return input;
7112
7112
  }
7113
7113
  var filter = typeof filterFunction === 'function'
7114
7114
  ? filterFunction
7115
7115
  : LinzFreeTextFilter;
7116
7116
  return filter(input);
7117
- }, [filterFunction]);
7117
+ }, [filterFunction, enabled]);
7118
7118
  var filterInputEvent = useCallback(function (event) {
7119
7119
  var value = event.target.value;
7120
7120
  var filteredValue = filterCharacters(value);
@@ -7127,7 +7127,7 @@ var LuiFilterCharactersProvider = function (_a) {
7127
7127
  event.target.setSelectionRange(newCaretPosition, newCaretPosition);
7128
7128
  }
7129
7129
  }
7130
- }, [filterFunction]);
7130
+ }, [filterFunction, filterCharacters]);
7131
7131
  return (React__default.createElement(LuiFilterCharactersContext.Provider, { value: { filterCharacters: filterCharacters, filterInputEvent: filterInputEvent } }, children));
7132
7132
  };
7133
7133