Skip to content

Commit

Permalink
chore(autocomplete): improve default value
Browse files Browse the repository at this point in the history
Co-Authored-by: Bertrand Zuchuat <[email protected]>
  • Loading branch information
Garfield-fr committed Sep 25, 2024
1 parent 48f7bbf commit 7ce1e97
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export interface IAutoComplete {
<ng-template let-item pTemplate="item">
<div class="flex align-items-center">
@if(item.iconClass) {
<i class="mr-1" [ngClass]="item.iconClass"></i>
<i class="mr-2" [ngClass]="item.iconClass"></i>
}
<div [innerHTML]="item.label" [title]="item.originalLabel ? item.originalLabel : ''"></div>
</div>
Expand Down Expand Up @@ -124,7 +124,6 @@ export class SearchAutocompleteComponent {
});
}
});

return suggestions;
} else {
return data[0];
Expand All @@ -150,11 +149,11 @@ export class SearchAutocompleteComponent {
recordType.index,
queryRecord,
1,
recordType.maxSuggestions ? recordType.maxSuggestions : 10,
recordType.maxSuggestions || 10,
[],
recordType.preFilters ? recordType.preFilters : {},
recordType.preFilters || {},
null,
recordType.sort ? recordType.sort : null,
recordType.sort || null,
).pipe(
map((data: any) => recordType.processSuggestions(data, query))
));
Expand Down

0 comments on commit 7ce1e97

Please sign in to comment.