#971 validate and edit only editable date columns

This commit is contained in:
Denys Vuika
2016-11-02 14:04:30 +00:00
parent 13eb62df0c
commit 736d57cc2e
3 changed files with 2 additions and 6 deletions
@@ -216,7 +216,7 @@ export class DateCellValidator implements CellValidator {
];
isSupported(column: DynamicTableColumn): boolean {
return column && this.supportedTypes.indexOf(column.type) > -1;
return column && column.editable && this.supportedTypes.indexOf(column.type) > -1;
}
validate(row: DynamicTableRow, column: DynamicTableColumn, summary?: DynamicRowValidationSummary): boolean {
@@ -13,7 +13,7 @@
<label class="mdl-textfield__label" [attr.for]="column.id">{{column.name}} (d-M-yyyy)</label>
</div>
</div>
<div class="mdl-cell mdl-cell--1-col">
<div *ngIf="column.editable" class="mdl-cell mdl-cell--1-col">
<button
class="mdl-button mdl-js-button mdl-button--icon date-editor--button"
(click)="datePicker.toggle()">
@@ -165,8 +165,4 @@ describe('DateEditorComponent', () => {
expect(table.flushValue).toHaveBeenCalled();
});
it('should not setup datepicker trigger', () => {
let component =
});
});