Skip to content

Commit

Permalink
fix: COM-259 boolean readonly
Browse files Browse the repository at this point in the history
  • Loading branch information
felixroos committed May 3, 2019
1 parent 047a4c6 commit cb43986
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions packages/data/src/lib/model-config/model-config.service.ts
Expand Up @@ -115,6 +115,7 @@ export class ModelConfigService extends Config {
filterable: true,
input: AdminEntryInputComponent,
output: DefaultEntryOutputComponent,
readOnly: true,
filterPopClass: 'ec-pop_dialog',
filterOperator: 'exact',
}
Expand Down
Expand Up @@ -18,7 +18,7 @@
</div>

<label *ngSwitchCase="'boolean'">
<input [id]="field.id" type="checkbox" [formControl]="control" [readonly]="formService.isReadOnly(field, item)">
<input [id]="field.id" type="checkbox" [formControl]="control" [attr.disabled]="formService.isReadOnly(field, item)?'disabled':'false'">
{{field.placeholder}}
</label>

Expand Down
1 change: 0 additions & 1 deletion src/app/crud/crud-demo.component.html
Expand Up @@ -14,7 +14,6 @@ <h2>ec-crud</h2>
field
to be able to edit it.</p>
<ec-crud model="baker" [config]="{develop:true,keepPopOpen:true,size:5,availableSizes:[1,2,5,10]}"></ec-crud>

</ec-tab>
</ec-tabs>
<ec-notifications></ec-notifications>
5 changes: 5 additions & 0 deletions src/app/form/form-demo.component.ts
Expand Up @@ -53,6 +53,11 @@ export class FormDemoComponent {
count: {
view: 'number',
create: false
},
delivered: {
view: 'boolean',
readonly: true,
prefill: true
}
}
};
Expand Down

0 comments on commit cb43986

Please sign in to comment.