Skip to content

Commit

Permalink
SHIBUI-706 Implemented fix for disabling type in provider editor
Browse files Browse the repository at this point in the history
  • Loading branch information
rmathis committed Aug 8, 2018
1 parent fed1e48 commit a1fe98b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
1 change: 0 additions & 1 deletion ui/src/app/schema-form/widget/select/select.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
<select *ngIf="schema.type !== 'array'"
[formControl]="control"
[attr.name]="name"
[attr.disabled]="schema.readOnly"
class="form-control">
<option disabled selected>{{ schema.placeholder || schema.title }}</option>
<option *ngFor="let option of schema.oneOf" [ngValue]="option.enum[0]">{{option.description}}</option>
Expand Down
2 changes: 1 addition & 1 deletion ui/src/app/schema-form/widget/select/select.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export class CustomSelectComponent extends SelectWidget implements AfterViewInit

ngAfterViewInit(): void {
super.ngAfterViewInit();
if (this.schema.readOnly) {
if (this.schema.readOnly || this.schema.widget.disabled) {
this.control.disable();
} else {
this.control.enable();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@
"type": "string",
"readOnly": true,
"widget": {
"id": "select"
"id": "select",
"disabled": true
},
"oneOf": [
{
Expand Down

0 comments on commit a1fe98b

Please sign in to comment.