Skip to content

Commit

Permalink
fix(query-builder) fix template sample formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
INFRAGISTICS\IPetrov authored and INFRAGISTICS\IPetrov committed Oct 14, 2024
1 parent 7f843ff commit 3a43e41
Showing 1 changed file with 7 additions and 17 deletions.
24 changes: 7 additions & 17 deletions en/components/query-builder.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,28 +179,18 @@ The search value of a condition can be templated using the [`igxQueryBuilderSear
let-selectedField = "selectedField"
let-selectedCondition = "selectedCondition"
let-defaultSearchValueTemplate = "defaultSearchValueTemplate">
@if (
selectedField?.field === 'Region' &&
(selectedCondition === 'equals' || selectedCondition === 'doesNotEqual')
){
@if (selectedField?.field === 'Region' && (selectedCondition === 'equals' || selectedCondition === 'doesNotEqual')){
<igx-select [placeholder]="'Select region'" [(ngModel)]="searchValue.value">
<igx-select-item *ngFor="let reg of regionOptions" [value]="reg.value">
{{ reg.text }}
</igx-select-item>
<igx-select-item *ngFor="let reg of regionOptions" [value]="reg.value">{{ reg.text }}</igx-select-item>
</igx-select>
}
@else if (
selectedField?.field === 'OrderStatus' &&
(selectedCondition === 'equals' || selectedCondition === 'doesNotEqual')
){
<igx-radio-group>
<igx-radio class="radio-sample" *ngFor="let stat of statusOptions" value="{{stat.value}}" [(ngModel)]="searchValue.value">
} @else if (selectedField?.field === 'OrderStatus' && (selectedCondition === 'equals' || selectedCondition === 'doesNotEqual')){
<igx-radio-group [(ngModel)]="searchValue.value">
<igx-radio class="radio-sample" *ngFor="let stat of statusOptions" value="{{stat.value}}">
{{stat.text}}
</igx-radio>
</igx-radio-group>
}
@else {
<ng-container #defaultTemplate *ngTemplateOutlet="defaultSearchValueTemplate"></ng-container>
} @else {
<ng-container *ngTemplateOutlet="defaultSearchValueTemplate"></ng-container>
}
</ng-template>
</igx-query-builder>
Expand Down

0 comments on commit 3a43e41

Please sign in to comment.