Skip to content

Commit

Permalink
Merged in bugfix/SHIBUI-706 (pull request #142)
Browse files Browse the repository at this point in the history
SHIBUI-706 Implemented fix for disabling type in provider editor

Approved-by: Shibui Jenkins <shibui.jenkins@gmail.com>
  • Loading branch information
rmathis committed Aug 8, 2018
2 parents fed1e48 + a1fe98b commit fe69a2c
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 fe69a2c

Please sign in to comment.