@fluxhub/fluxhub-lib 10.0.203 → 10.0.205
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/bundles/fluxhub-fluxhub-lib.umd.js +25 -39
- package/bundles/fluxhub-fluxhub-lib.umd.js.map +1 -1
- package/bundles/fluxhub-fluxhub-lib.umd.min.js +1 -1
- package/bundles/fluxhub-fluxhub-lib.umd.min.js.map +1 -1
- package/esm2015/lib/controls/fhautocomplete.js +26 -33
- package/fesm2015/fluxhub-fluxhub-lib.js +25 -32
- package/fesm2015/fluxhub-fluxhub-lib.js.map +1 -1
- package/package.json +1 -1
|
@@ -7127,49 +7127,35 @@
|
|
|
7127
7127
|
this.focusout.emit();
|
|
7128
7128
|
};
|
|
7129
7129
|
FHAutoCompleteComponent.prototype.onChange_up = function (e) {
|
|
7130
|
-
var _this = this;
|
|
7131
7130
|
// console.log('onChange()');
|
|
7132
|
-
|
|
7133
|
-
|
|
7134
|
-
if (this.sItem != '')
|
|
7135
|
-
this.searchItemsFiltered = this.myData.filter(function (option) { return option.descrizione_valore.toLowerCase().includes(_this.sItem); }).map(function (_a) {
|
|
7136
|
-
var data = _a.data;
|
|
7137
|
-
return data.slice(0, 20);
|
|
7138
|
-
});
|
|
7139
|
-
else
|
|
7140
|
-
this.searchItemsFiltered = this.myData.map(function (_a) {
|
|
7141
|
-
var data = _a.data;
|
|
7142
|
-
return data.slice(0, 20);
|
|
7143
|
-
});
|
|
7144
|
-
/* if (this.sItem != null) {
|
|
7131
|
+
this.searchItemsFiltered = [];
|
|
7132
|
+
if (this.sItem != null) {
|
|
7145
7133
|
if (this.sItem != "") {
|
|
7146
|
-
|
|
7147
|
-
|
|
7148
|
-
|
|
7149
|
-
|
|
7150
|
-
|
|
7151
|
-
|
|
7152
|
-
|
|
7153
|
-
|
|
7154
|
-
|
|
7155
|
-
|
|
7134
|
+
var ps = this.sItem.toLowerCase();
|
|
7135
|
+
if (this.myData != null)
|
|
7136
|
+
for (var i = 0; i < this.myData.length; i++) {
|
|
7137
|
+
if (this.myData[i].descrizione_valore != null) {
|
|
7138
|
+
if (this.myData[i].descrizione_valore.toLowerCase().indexOf(ps) !=
|
|
7139
|
+
-1) {
|
|
7140
|
+
this.searchItemsFiltered.push(this.myData[i]);
|
|
7141
|
+
}
|
|
7142
|
+
}
|
|
7143
|
+
if (ps.length < 4 && this.searchItemsFiltered.length == 20) {
|
|
7144
|
+
break;
|
|
7145
|
+
}
|
|
7156
7146
|
}
|
|
7157
|
-
}
|
|
7158
|
-
if (ps.length < 4 && this.searchItemsFiltered.length == 20) {
|
|
7159
|
-
break;
|
|
7160
|
-
}
|
|
7161
|
-
}
|
|
7162
|
-
} else {
|
|
7163
|
-
// console.log('onChange()1');
|
|
7164
|
-
if (this.myData != null)
|
|
7165
|
-
for (let i: number = 0; i < this.myData.length; i++) {
|
|
7166
|
-
this.searchItemsFiltered.push(this.myData[i]);
|
|
7167
|
-
if (i == 20) {
|
|
7168
|
-
break;
|
|
7169
|
-
}
|
|
7170
|
-
}
|
|
7171
7147
|
}
|
|
7172
|
-
|
|
7148
|
+
else {
|
|
7149
|
+
// console.log('onChange()1');
|
|
7150
|
+
if (this.myData != null)
|
|
7151
|
+
for (var i = 0; i < this.myData.length; i++) {
|
|
7152
|
+
this.searchItemsFiltered.push(this.myData[i]);
|
|
7153
|
+
if (i == 20) {
|
|
7154
|
+
break;
|
|
7155
|
+
}
|
|
7156
|
+
}
|
|
7157
|
+
}
|
|
7158
|
+
}
|
|
7173
7159
|
};
|
|
7174
7160
|
FHAutoCompleteComponent.prototype.selectedSearchItem = function (event) {
|
|
7175
7161
|
this.setByDescri(event.option.value);
|