intelicoreact 2.0.12 → 2.0.15

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/index.cjs CHANGED
@@ -15592,7 +15592,7 @@ var TagsDropdown = ({
15592
15592
  const singleLevelOptions = options?.reduce(
15593
15593
  (acc, item) => {
15594
15594
  const checkUniqAndPush = (acc2, item2) => {
15595
- const isExist = acc2?.findIndex(({ value }) => value === item2?.value);
15595
+ const isExist = acc2?.findIndex(({ value }) => String(value) === String(item2?.value));
15596
15596
  if (isExist !== -1) {
15597
15597
  acc2[isExist] = item2;
15598
15598
  } else {
@@ -15918,7 +15918,11 @@ var TagsDropdown = ({
15918
15918
  } else if (isMobile ? closeOnSelectMobile : closeOnSelect) {
15919
15919
  setIsOpen(false);
15920
15920
  }
15921
- setSearchValueInterceptor("");
15921
+ if (inputRef?.current?.focus) {
15922
+ inputRef.current.focus();
15923
+ const len = inputRef.current?.value?.length ?? 0;
15924
+ inputRef.current.setSelectionRange(len, len);
15925
+ }
15922
15926
  if (item.value && chosenOptions.includes(item.value)) {
15923
15927
  deleteChosen(item.value);
15924
15928
  return null;
@@ -16280,7 +16284,7 @@ var TagsDropdown = ({
16280
16284
  TagList_default,
16281
16285
  {
16282
16286
  items: chosenOptions?.map((value, i) => {
16283
- const tag = singleLevelOptions?.find((el) => el.value === value);
16287
+ const tag = singleLevelOptions?.find((el) => String(el.value) === String(value));
16284
16288
  const label2 = isValuesInTags ? tag?.value : tag?.label || tag?.name || tag?.title;
16285
16289
  return {
16286
16290
  value,
@@ -16295,7 +16299,7 @@ var TagsDropdown = ({
16295
16299
  }
16296
16300
  )
16297
16301
  ) : chosenOptions?.map((value) => {
16298
- const tag = singleLevelOptions?.find((el) => el.value === value);
16302
+ const tag = singleLevelOptions?.find((el) => String(el.value) === String(value));
16299
16303
  const label2 = isValuesInTags ? tag?.value : tag?.label || tag?.name || tag?.title;
16300
16304
  return /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
16301
16305
  Tag_default,
@@ -16423,6 +16427,7 @@ var TagsDropdown = ({
16423
16427
  }
16424
16428
  getListContainer2()?.classList.remove("tags-dropdown__container--opened");
16425
16429
  if (withSearchInputInList) setSearchValueInterceptor("");
16430
+ searchValueRef.current = "";
16426
16431
  setListPos(null);
16427
16432
  setSearchValue("");
16428
16433
  }
@@ -16479,7 +16484,7 @@ var TagsDropdown = ({
16479
16484
  }, [scrollTop, dropdownListRef?.current]);
16480
16485
  (0, import_react60.useEffect)(() => {
16481
16486
  if (isSearchable && useLiveSearch && (debouncedSearchTerm || isValueDeleted || isOpen)) {
16482
- doLiveSearchRequest?.(debouncedSearchTerm);
16487
+ doLiveSearchRequest?.(searchValue ? debouncedSearchTerm : "");
16483
16488
  }
16484
16489
  }, [isOpen, debouncedSearchTerm, isValueDeleted]);
16485
16490
  (0, import_react60.useEffect)(() => {