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/form.cjs +10 -5
- package/dist/form.cjs.map +2 -2
- package/dist/form.js +10 -5
- package/dist/form.js.map +2 -2
- package/dist/index.cjs +10 -5
- package/dist/index.cjs.map +2 -2
- package/dist/index.js +10 -5
- package/dist/index.js.map +2 -2
- package/package.json +1 -1
package/dist/form.cjs
CHANGED
|
@@ -11689,7 +11689,7 @@ var TagsDropdown = ({
|
|
|
11689
11689
|
const singleLevelOptions = options?.reduce(
|
|
11690
11690
|
(acc, item) => {
|
|
11691
11691
|
const checkUniqAndPush = (acc2, item2) => {
|
|
11692
|
-
const isExist = acc2?.findIndex(({ value }) => value === item2?.value);
|
|
11692
|
+
const isExist = acc2?.findIndex(({ value }) => String(value) === String(item2?.value));
|
|
11693
11693
|
if (isExist !== -1) {
|
|
11694
11694
|
acc2[isExist] = item2;
|
|
11695
11695
|
} else {
|
|
@@ -12015,7 +12015,11 @@ var TagsDropdown = ({
|
|
|
12015
12015
|
} else if (isMobile ? closeOnSelectMobile : closeOnSelect) {
|
|
12016
12016
|
setIsOpen(false);
|
|
12017
12017
|
}
|
|
12018
|
-
|
|
12018
|
+
if (inputRef?.current?.focus) {
|
|
12019
|
+
inputRef.current.focus();
|
|
12020
|
+
const len = inputRef.current?.value?.length ?? 0;
|
|
12021
|
+
inputRef.current.setSelectionRange(len, len);
|
|
12022
|
+
}
|
|
12019
12023
|
if (item.value && chosenOptions.includes(item.value)) {
|
|
12020
12024
|
deleteChosen(item.value);
|
|
12021
12025
|
return null;
|
|
@@ -12377,7 +12381,7 @@ var TagsDropdown = ({
|
|
|
12377
12381
|
TagList_default,
|
|
12378
12382
|
{
|
|
12379
12383
|
items: chosenOptions?.map((value, i) => {
|
|
12380
|
-
const tag = singleLevelOptions?.find((el) => el.value === value);
|
|
12384
|
+
const tag = singleLevelOptions?.find((el) => String(el.value) === String(value));
|
|
12381
12385
|
const label2 = isValuesInTags ? tag?.value : tag?.label || tag?.name || tag?.title;
|
|
12382
12386
|
return {
|
|
12383
12387
|
value,
|
|
@@ -12392,7 +12396,7 @@ var TagsDropdown = ({
|
|
|
12392
12396
|
}
|
|
12393
12397
|
)
|
|
12394
12398
|
) : chosenOptions?.map((value) => {
|
|
12395
|
-
const tag = singleLevelOptions?.find((el) => el.value === value);
|
|
12399
|
+
const tag = singleLevelOptions?.find((el) => String(el.value) === String(value));
|
|
12396
12400
|
const label2 = isValuesInTags ? tag?.value : tag?.label || tag?.name || tag?.title;
|
|
12397
12401
|
return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
12398
12402
|
Tag_default,
|
|
@@ -12520,6 +12524,7 @@ var TagsDropdown = ({
|
|
|
12520
12524
|
}
|
|
12521
12525
|
getListContainer2()?.classList.remove("tags-dropdown__container--opened");
|
|
12522
12526
|
if (withSearchInputInList) setSearchValueInterceptor("");
|
|
12527
|
+
searchValueRef.current = "";
|
|
12523
12528
|
setListPos(null);
|
|
12524
12529
|
setSearchValue("");
|
|
12525
12530
|
}
|
|
@@ -12576,7 +12581,7 @@ var TagsDropdown = ({
|
|
|
12576
12581
|
}, [scrollTop, dropdownListRef?.current]);
|
|
12577
12582
|
(0, import_react60.useEffect)(() => {
|
|
12578
12583
|
if (isSearchable && useLiveSearch && (debouncedSearchTerm || isValueDeleted || isOpen)) {
|
|
12579
|
-
doLiveSearchRequest?.(debouncedSearchTerm);
|
|
12584
|
+
doLiveSearchRequest?.(searchValue ? debouncedSearchTerm : "");
|
|
12580
12585
|
}
|
|
12581
12586
|
}, [isOpen, debouncedSearchTerm, isValueDeleted]);
|
|
12582
12587
|
(0, import_react60.useEffect)(() => {
|