mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2026-09-09 18:03:21 +00:00
#971 validate and edit only editable date columns
This commit is contained in:
@@ -216,7 +216,7 @@ export class DateCellValidator implements CellValidator {
|
|||||||
];
|
];
|
||||||
|
|
||||||
isSupported(column: DynamicTableColumn): boolean {
|
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 {
|
validate(row: DynamicTableRow, column: DynamicTableColumn, summary?: DynamicRowValidationSummary): boolean {
|
||||||
|
|||||||
+1
-1
@@ -13,7 +13,7 @@
|
|||||||
<label class="mdl-textfield__label" [attr.for]="column.id">{{column.name}} (d-M-yyyy)</label>
|
<label class="mdl-textfield__label" [attr.for]="column.id">{{column.name}} (d-M-yyyy)</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="mdl-cell mdl-cell--1-col">
|
<div *ngIf="column.editable" class="mdl-cell mdl-cell--1-col">
|
||||||
<button
|
<button
|
||||||
class="mdl-button mdl-js-button mdl-button--icon date-editor--button"
|
class="mdl-button mdl-js-button mdl-button--icon date-editor--button"
|
||||||
(click)="datePicker.toggle()">
|
(click)="datePicker.toggle()">
|
||||||
|
|||||||
-4
@@ -165,8 +165,4 @@ describe('DateEditorComponent', () => {
|
|||||||
expect(table.flushValue).toHaveBeenCalled();
|
expect(table.flushValue).toHaveBeenCalled();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should not setup datepicker trigger', () => {
|
|
||||||
let component =
|
|
||||||
});
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user