@esfaenza/core 15.2.178 → 15.2.179

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.
@@ -449,6 +449,7 @@ class NavBarLoc extends LocalizationService {
449
449
  super.set("it->en", "Job Applicativi", ["Application Jobs"]);
450
450
  super.set("it->en", "Al momento non c'è nulla in esecuzione", ["Nothing being executed at the moment"]);
451
451
  super.set("it->en", "Job Completato", ["Job Completed"]);
452
+ super.set("it->en", "Scrivere almeno 3 caratteri per utilizzare la ricerca globale", ["You must write at least 3 characters in order to use the Global Research"]);
452
453
  }
453
454
  }
454
455
  NavBarLoc.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NavBarLoc, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable });
@@ -627,9 +628,18 @@ class Navbar extends ReactiveComponent {
627
628
  this.searchResult = null;
628
629
  if (!this.globalSearchService.Enabled)
629
630
  return;
631
+ if (this.searchTerm.trim().length < 3) {
632
+ this.msgExts.simpleWarning(this.lc.loc("Scrivere almeno 3 caratteri per utilizzare la ricerca globale"));
633
+ return;
634
+ }
630
635
  this.globalSearchService.search(this.searchTerm).subscribe(t => {
631
636
  this.searchingTerm = false;
632
637
  this.searchResult = t;
638
+ // Short-circuit in assenza di risultati
639
+ if ((this.searchResult.results.length || 0) === 0) {
640
+ this.cdr.markForCheck();
641
+ return;
642
+ }
633
643
  this.searchResult.results.forEach(t => {
634
644
  t.est_cols = t.columns.map(c => {
635
645
  let colLink = this.globalSearchService.generateColumnLink(c);