hplx-react-elements-dev 1.0.51 → 1.0.52

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.
Files changed (2) hide show
  1. package/dist/esm/index.js +16 -2
  2. package/package.json +1 -1
package/dist/esm/index.js CHANGED
@@ -5366,7 +5366,7 @@ var AddSuggestion = function AddSuggestion(_a) {
5366
5366
  setShowDropdown(true);
5367
5367
 
5368
5368
  if (options && options.length > 0) {
5369
- sug = options.filter(function (options) {
5369
+ sug = options === null || options === void 0 ? void 0 : options.filter(function (options) {
5370
5370
  return options.label.toLowerCase().includes(e.target.value.split(",").pop().toLowerCase());
5371
5371
  } // last keyboad input after ,
5372
5372
  );
@@ -5380,6 +5380,17 @@ var AddSuggestion = function AddSuggestion(_a) {
5380
5380
  }
5381
5381
  };
5382
5382
 
5383
+ useEffect(function () {
5384
+ var sug = [];
5385
+
5386
+ if (options && options.length > 0) {
5387
+ sug = options.filter(function (options) {
5388
+ return options.label.toLowerCase();
5389
+ });
5390
+ setSuggestionArr(sug);
5391
+ }
5392
+ }, []);
5393
+
5383
5394
  var handleClickOutside = function handleClickOutside(e) {
5384
5395
  if (wrapperRef.current && !wrapperRef.current.contains(e.target)) {
5385
5396
  setShowDropdown(false);
@@ -5455,7 +5466,10 @@ var AddSuggestion = function AddSuggestion(_a) {
5455
5466
  suffixClassName: suffixClassName,
5456
5467
  inputProps: __assign(__assign({}, inputFieldInputProps), {
5457
5468
  onChange: changeHandler,
5458
- value: sugVal
5469
+ value: sugVal,
5470
+ onFocus: function onFocus() {
5471
+ return setShowDropdown(true);
5472
+ }
5459
5473
  })
5460
5474
  }) : jsxRuntime.exports.jsx(TextAreaField, {
5461
5475
  label: label,
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  "frontend",
10
10
  "healthplix"
11
11
  ],
12
- "version": "1.0.51",
12
+ "version": "1.0.52",
13
13
  "main": "dist/esm/index.js",
14
14
  "module": "dist/esm/index.js",
15
15
  "types": "dist/esm/index.d.ts",