hplx-react-elements-dev 1.0.82 → 1.0.84
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/esm/index.js +12 -10
- package/package.json +1 -1
package/dist/esm/index.js
CHANGED
|
@@ -17969,7 +17969,7 @@ var InputTag = function InputTag(_a) {
|
|
|
17969
17969
|
if (focusIndex < dropdownArr.length - 1) {
|
|
17970
17970
|
var focusI = focusIndex + 1;
|
|
17971
17971
|
|
|
17972
|
-
if (wrapperRef && wrapperRef.current) {
|
|
17972
|
+
if (wrapperRef && wrapperRef.current && focusI > 1) {
|
|
17973
17973
|
wrapperRef.current.scrollBy(0, ITEM_HEIGHT);
|
|
17974
17974
|
}
|
|
17975
17975
|
|
|
@@ -17982,27 +17982,29 @@ var InputTag = function InputTag(_a) {
|
|
|
17982
17982
|
if (focusIndex > 0) {
|
|
17983
17983
|
var focusI = focusIndex - 1;
|
|
17984
17984
|
|
|
17985
|
-
if (wrapperRef && wrapperRef.current) {
|
|
17985
|
+
if (wrapperRef && wrapperRef.current && focusI < dropdownArr.length - 2) {
|
|
17986
17986
|
wrapperRef.current.scrollBy(0, -ITEM_HEIGHT);
|
|
17987
17987
|
}
|
|
17988
17988
|
|
|
17989
17989
|
setFocusIndex(focusI);
|
|
17990
17990
|
}
|
|
17991
|
-
} // on key left
|
|
17991
|
+
} // on key left or right key
|
|
17992
17992
|
|
|
17993
17993
|
|
|
17994
|
-
if (e.keyCode === 37) {
|
|
17994
|
+
if (e.keyCode === 37 || e.keyCode === 39) {
|
|
17995
17995
|
if (focusIndex >= 0) {
|
|
17996
|
-
setFocusIndex(focusIndex);
|
|
17996
|
+
// setFocusIndex(focusIndex);
|
|
17997
17997
|
setTagInputValue(dropdownArr[focusIndex].value);
|
|
17998
17998
|
}
|
|
17999
|
-
} // on key
|
|
17999
|
+
} // on key enter
|
|
18000
18000
|
|
|
18001
18001
|
|
|
18002
|
-
if (e.keyCode ===
|
|
18003
|
-
if (focusIndex
|
|
18004
|
-
|
|
18005
|
-
|
|
18002
|
+
if (e.keyCode === 13) {
|
|
18003
|
+
if (focusIndex >= 0) {
|
|
18004
|
+
setTags(__spreadArray(__spreadArray([], tags, true), [dropdownArr[focusIndex].value.trim()], false));
|
|
18005
|
+
setValue(tags.filter(Boolean).join(", "));
|
|
18006
|
+
setTagInputValue("");
|
|
18007
|
+
setFocusIndex(-1);
|
|
18006
18008
|
}
|
|
18007
18009
|
}
|
|
18008
18010
|
};
|