hplx-react-elements-dev 1.0.57 → 1.0.58
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
|
@@ -5478,7 +5478,7 @@ var AddSuggestion = function AddSuggestion(_a) {
|
|
|
5478
5478
|
|
|
5479
5479
|
if (options && options.length > 0) {
|
|
5480
5480
|
sug = options === null || options === void 0 ? void 0 : options.filter(function (options) {
|
|
5481
|
-
return options.label.toLowerCase().includes(e.target.value.split(",").pop().toLowerCase());
|
|
5481
|
+
return options.label.toLowerCase().includes(e.target.value.split(",").pop().trim().toLowerCase());
|
|
5482
5482
|
} // last keyboad input after ,
|
|
5483
5483
|
);
|
|
5484
5484
|
setSuggestionArr(sug);
|
|
@@ -5519,15 +5519,16 @@ var AddSuggestion = function AddSuggestion(_a) {
|
|
|
5519
5519
|
};
|
|
5520
5520
|
|
|
5521
5521
|
var handleSuggestionClick = function handleSuggestionClick(selectedItem) {
|
|
5522
|
-
var val = selectedItem.label;
|
|
5522
|
+
var val = selectedItem.label + ", ";
|
|
5523
5523
|
var result = "";
|
|
5524
5524
|
|
|
5525
5525
|
if (suggestionValue === null || suggestionValue === void 0 ? void 0 : suggestionValue.length) {
|
|
5526
|
+
suggestionValue = suggestionValue.slice(0, suggestionValue.lastIndexOf(","));
|
|
5526
5527
|
var debris = suggestionValue.trim().split(", "); //explode string into array of strings indexed by /, |. |\s /
|
|
5527
5528
|
// debris.pop(); //pop last element off the array (which we didn't want)
|
|
5528
5529
|
|
|
5529
5530
|
result = debris.join(", ");
|
|
5530
|
-
val = result + checkComma(result) + selectedItem.label;
|
|
5531
|
+
val = result + checkComma(result) + selectedItem.label + ", ";
|
|
5531
5532
|
}
|
|
5532
5533
|
|
|
5533
5534
|
handleSuggestionValChange && handleSuggestionValChange(val);
|