mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
#82 multiselection UI for datatable
This commit is contained in:
@@ -1,5 +1,11 @@
|
||||
<div class="p-10">
|
||||
<alfresco-datatable [data]="data"></alfresco-datatable>
|
||||
<alfresco-datatable [data]="data" [multiselect]="multiselect"></alfresco-datatable>
|
||||
</div>
|
||||
<div class="p-10">
|
||||
<label class="mdl-checkbox mdl-js-checkbox mdl-js-ripple-effect" for="checkbox-1">
|
||||
<input type="checkbox" id="checkbox-1" class="mdl-checkbox__input" [(ngModel)]="multiselect">
|
||||
<span class="mdl-checkbox__label">Multiselect</span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="p-10">
|
||||
<button
|
||||
|
@@ -35,6 +35,8 @@ declare let __moduleName: string;
|
||||
pipes: [AlfrescoPipeTranslate]
|
||||
})
|
||||
export class DataTableDemoComponent {
|
||||
|
||||
multiselect: boolean = false;
|
||||
data: ObjectDataTableAdapter;
|
||||
|
||||
private _imageUrl: string = 'http://placehold.it/140x100';
|
||||
@@ -88,7 +90,7 @@ export class DataTableDemoComponent {
|
||||
replaceColumns() {
|
||||
let schema = [
|
||||
{ type: 'text', key: 'id', sortable: true },
|
||||
{ type: 'text', key: 'name', sortable: true }
|
||||
{ type: 'text', key: 'name', sortable: true, cssClass: 'full-width name-column' }
|
||||
];
|
||||
let columns = schema.map(col => new ObjectDataColumn(col));
|
||||
this.data.setColumns(columns);
|
||||
|
Reference in New Issue
Block a user