hplx-react-elements-dev 1.1.22 → 1.1.23
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 +7 -3
- package/package.json +1 -1
package/dist/esm/index.js
CHANGED
|
@@ -5731,7 +5731,7 @@ var AddSuggestion = function AddSuggestion(_a) {
|
|
|
5731
5731
|
|
|
5732
5732
|
|
|
5733
5733
|
var handleSuggestionClick = function handleSuggestionClick(selectedItem, index) {
|
|
5734
|
-
var val = selectedItem.value
|
|
5734
|
+
var val = selectedItem.value;
|
|
5735
5735
|
var result = "";
|
|
5736
5736
|
|
|
5737
5737
|
if (suggestionValue === null || suggestionValue === void 0 ? void 0 : suggestionValue.length) {
|
|
@@ -5744,7 +5744,7 @@ var AddSuggestion = function AddSuggestion(_a) {
|
|
|
5744
5744
|
// result = debris.join(", ");
|
|
5745
5745
|
// suggestionText(suggestionValue[0])
|
|
5746
5746
|
result = suggestionText(suggestionValue)[0].trim();
|
|
5747
|
-
val = result + "
|
|
5747
|
+
val = result + "\n" + selectedItem.value + "\n";
|
|
5748
5748
|
}
|
|
5749
5749
|
|
|
5750
5750
|
handleSuggestionValChange && handleSuggestionValChange(val, "dropdown");
|
|
@@ -5761,6 +5761,8 @@ var AddSuggestion = function AddSuggestion(_a) {
|
|
|
5761
5761
|
}
|
|
5762
5762
|
|
|
5763
5763
|
if (e.keyCode === 40) {
|
|
5764
|
+
if (focusIndex >= 0) e.preventDefault();
|
|
5765
|
+
|
|
5764
5766
|
if (focusIndex < suggestionArr.length - 1) {
|
|
5765
5767
|
var focusI = focusIndex + 1;
|
|
5766
5768
|
|
|
@@ -5774,6 +5776,8 @@ var AddSuggestion = function AddSuggestion(_a) {
|
|
|
5774
5776
|
|
|
5775
5777
|
|
|
5776
5778
|
if (e.keyCode === 38) {
|
|
5779
|
+
if (focusIndex >= 0) e.preventDefault();
|
|
5780
|
+
|
|
5777
5781
|
if (focusIndex > 0) {
|
|
5778
5782
|
var focusI = focusIndex - 1;
|
|
5779
5783
|
|
|
@@ -5786,7 +5790,7 @@ var AddSuggestion = function AddSuggestion(_a) {
|
|
|
5786
5790
|
}
|
|
5787
5791
|
|
|
5788
5792
|
if (e.keyCode === 13 || e.keyCode === 9) {
|
|
5789
|
-
e.preventDefault();
|
|
5793
|
+
if (focusIndex >= 0) e.preventDefault();
|
|
5790
5794
|
|
|
5791
5795
|
if (focusIndex >= 0) {
|
|
5792
5796
|
// const res = [suggestionArr[focusIndex].value.trim()];
|