Skip to content

Commit

Permalink
example 0.1.0-rc.8
Browse files Browse the repository at this point in the history
  • Loading branch information
Caballerog committed Aug 16, 2016
1 parent 899e42f commit 0bb8e00
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
8 changes: 8 additions & 0 deletions demos/basic/src/app/app.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,14 @@ <h1>



<div>
<inline-editor type="select"
[(ngModel)]="editableSelectOptionsTwoLevelsDefault"
(onSave)="saveEditable($event)"
[options]="editableSelectOptionsTwoLevelsConfiguration"></inline-editor>
</div>


<div>
<h3>Disabled components</h3>
<inline-editor type="text" [(ngModel)]="editableText" (onSave)="saveEditable($event)" disabled="true"></inline-editor>
Expand Down
21 changes: 21 additions & 0 deletions demos/basic/src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,27 @@ export class AppComponent {
text: 'field'
}

editableSelectOptionsTwoLevelsDefault = 1;
editableSelectOptionsTwoLevelsConfiguration = {
data: [
{
id: 1, field: 'status1',
children: [
{ id: 5, field: 'status1.1' },
{ id: 6, field: 'status1.2' }
]
},
{ id: 2, field: 'status2' },
{ id: 3, field: 'status3' },
{
id: 4, field: 'status4',
children: [{ id: 7, field: 'status4.1' }]
}
],
value: 'id',
text: 'field'
}

fnErrorLength = function () {
alert('This is a custom error!');
}
Expand Down

0 comments on commit 0bb8e00

Please sign in to comment.