Skip to content

Commit

Permalink
adjust: improve logic
Browse files Browse the repository at this point in the history
  • Loading branch information
JonasPeres committed Dec 5, 2024
1 parent c1c2116 commit 3395c2c
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,14 @@
<ng-template *ngTemplateOutlet="option; context: { opt: opt, i: index }"></ng-template>
</ng-container>
</cdk-virtual-scroll-viewport>
<p *ngIf="!_options?.length && !selectEmptyTemplate">
{{ 'forms.searchSelectEmpty' | translateInternal | async }}
</p>
<span *ngIf="selectEmptyTemplate">
<ng-container *ngTemplateOutlet="selectEmptyTemplate"></ng-container>
</span>
<ng-container *ngIf="!_options?.length">
<p class="mb-0 mt-3" *ngIf="!selectEmptyTemplate">
{{ 'forms.searchSelectEmpty' | translateInternal | async }}
</p>
<span *ngIf="selectEmptyTemplate">
<ng-container *ngTemplateOutlet="selectEmptyTemplate"></ng-container>
</span>
</ng-container>
</div>
</div>
</div>
Expand Down
14 changes: 8 additions & 6 deletions src/components/sq-select-search/sq-select-search.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,14 @@
<ng-template *ngTemplateOutlet="option; context: { opt: opt, i: index }"></ng-template>
</ng-container>
</cdk-virtual-scroll-viewport>
<p class="mb-0 mt-3" *ngIf="!_options?.length && !selectEmptyTemplate">
{{ 'forms.searchSelectEmpty' | translateInternal | async }}
</p>
<span *ngIf="selectEmptyTemplate">
<ng-container *ngTemplateOutlet="selectEmptyTemplate"></ng-container>
</span>
<ng-container *ngIf="!_options?.length">
<p class="mb-0 mt-3" *ngIf="!selectEmptyTemplate">
{{ 'forms.searchSelectEmpty' | translateInternal | async }}
</p>
<span *ngIf="selectEmptyTemplate">
<ng-container *ngTemplateOutlet="selectEmptyTemplate"></ng-container>
</span>
</ng-container>
</div>
</div>
<div
Expand Down
2 changes: 1 addition & 1 deletion src/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@squidit/ngx-css",
"version": "1.3.64",
"version": "1.3.65",
"peerDependencies": {
"@angular/common": ">=15.0.0",
"@angular/cdk": ">=15.0.0",
Expand Down

0 comments on commit 3395c2c

Please sign in to comment.