Skip to content

Commit

Permalink
feat(list-view): add checkbox to allow multi-select
Browse files Browse the repository at this point in the history
  • Loading branch information
ElonH committed May 28, 2020
1 parent 7e481ce commit f5ac788
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/app/pages/manager/fileMode/listView/listView.component.ts
Expand Up @@ -16,14 +16,22 @@ import { API, APIDefinition } from 'ngx-easy-table';
@Component({
selector: 'manager-listView',
template: `
<ng-template #secAll>
<nb-checkbox> </nb-checkbox>
</ng-template>
<ngx-table
#table
[configuration]="configuration"
[data]="data"
[columns]="columns"
[selectAllTemplate]="secAll"
(event)="eventEmitted($event)"
>
<ng-template let-row let-index="index">
<td>
<nb-checkbox> </nb-checkbox>
<!-- todo: disable double click event here-->
</td>
<td>{{ row.Name }}</td>
<td>{{ row.Size }}</td>
<td>{{ row.ModTime }}</td>
Expand Down Expand Up @@ -81,6 +89,7 @@ export class ListViewComponent implements OnInit, OnDestroy {

this.configuration = { ...DefaultConfig };
this.configuration.searchEnabled = true;
this.configuration.checkboxes = true;
// this.configuration.isLoading = true;
// ... etc.
}
Expand Down
2 changes: 2 additions & 0 deletions src/app/pages/manager/manager.module.ts
Expand Up @@ -10,6 +10,7 @@ import {
NbProgressBarModule,
NbLayoutModule,
NbSidebarModule,
NbCheckboxModule,
} from '@nebular/theme';
import { BreadcrumbComponent } from './breadcrumb/breadcrumb.component';
import { HomeModeComponent } from './homeMode/homeMode.component';
Expand Down Expand Up @@ -37,6 +38,7 @@ import { ListViewComponent } from './fileMode/listView/listView.component';
TableModule,
NbLayoutModule,
NbSidebarModule,
NbCheckboxModule,
],
})
export class ManagerModule {}

0 comments on commit f5ac788

Please sign in to comment.