Skip to content

Commit

Permalink
fix: critical create aplication schemas selects[3141]
Browse files Browse the repository at this point in the history
  • Loading branch information
Ihar committed Jan 15, 2025
1 parent 02457f3 commit b1fec3e
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,19 @@
[(ngModel)]="value"
[disabled]="disabled"
placeholder="Select a schema"
[options]="getSchemaOptions()"
optionLabel="label"
[options]="schemas"
optionLabel="displayName"
optionValue="value"
[appendTo]="'body'"
(ngModelChange)="onChange()"
>
<ng-template let-item pTemplate="item">
<div
pTooltip="{{ item.tooltip }}"
tooltipPosition="below"
class="schema-variable"
>
{{ item.label }}
{{ item.displayName }}
</div>
</ng-template>
</p-dropdown>
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,4 @@ export class SelectSchema {

ngOnChanges(changes: SimpleChanges) {
}

getSchemaOptions() {
return this.schemas.map(schema => ({
label: schema.displayName,
value: schema.value,
tooltip: schema.tooltip,
disabled: schema.disable
}));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,9 @@
(onChange)="onSave()"
placeholder="Select a value"
[options]="getPresetOptions()"
optionLabel="label">
optionLabel="label"
[appendTo]="'body'"
>
</p-dropdown>
</td>
</tr>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,9 @@
(onChange)="onSave()"
placeholder="Select a value"
[options]="getPresetOptions()"
optionLabel="label">
optionLabel="label"
[appendTo]="'body'"
>
</p-dropdown>
</td>
</tr>
Expand Down

0 comments on commit b1fec3e

Please sign in to comment.