hplx-react-elements-dev 1.0.81 → 1.0.83
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 +4 -3
- package/package.json +1 -1
package/dist/esm/index.js
CHANGED
|
@@ -17944,8 +17944,9 @@ var InputTag = function InputTag(_a) {
|
|
|
17944
17944
|
var addTags = function addTags(e) {
|
|
17945
17945
|
var ITEM_HEIGHT = 40;
|
|
17946
17946
|
|
|
17947
|
-
if (e.keyCode === 13 && tagInputValue.trim() && tagInputValue.trim().length > 1 && (allowDuplicates || !tags.includes(tagInputValue.trim())) // check if allowDuplicates flag is true or tagInputValue is not already in tags
|
|
17947
|
+
if ((e.keyCode === 9 || e.keyCode === 13) && tagInputValue.trim() && tagInputValue.trim().length > 1 && (allowDuplicates || !tags.includes(tagInputValue.trim())) // check if allowDuplicates flag is true or tagInputValue is not already in tags
|
|
17948
17948
|
) {
|
|
17949
|
+
e.preventDefault();
|
|
17949
17950
|
setTags(__spreadArray(__spreadArray([], tags, true), [tagInputValue.trim()], false));
|
|
17950
17951
|
setValue(tags.filter(Boolean).join(", "));
|
|
17951
17952
|
setTagInputValue("");
|
|
@@ -17968,7 +17969,7 @@ var InputTag = function InputTag(_a) {
|
|
|
17968
17969
|
if (focusIndex < dropdownArr.length - 1) {
|
|
17969
17970
|
var focusI = focusIndex + 1;
|
|
17970
17971
|
|
|
17971
|
-
if (wrapperRef && wrapperRef.current) {
|
|
17972
|
+
if (wrapperRef && wrapperRef.current && focusI > 1) {
|
|
17972
17973
|
wrapperRef.current.scrollBy(0, ITEM_HEIGHT);
|
|
17973
17974
|
}
|
|
17974
17975
|
|
|
@@ -17981,7 +17982,7 @@ var InputTag = function InputTag(_a) {
|
|
|
17981
17982
|
if (focusIndex > 0) {
|
|
17982
17983
|
var focusI = focusIndex - 1;
|
|
17983
17984
|
|
|
17984
|
-
if (wrapperRef && wrapperRef.current) {
|
|
17985
|
+
if (wrapperRef && wrapperRef.current && focusI < dropdownArr.length - 2) {
|
|
17985
17986
|
wrapperRef.current.scrollBy(0, -ITEM_HEIGHT);
|
|
17986
17987
|
}
|
|
17987
17988
|
|