mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
Move and delete rows (dynamic table)
This commit is contained in:
@@ -38,4 +38,34 @@ export class DynamicTableWidget extends WidgetComponent implements OnInit {
|
||||
this.content.selectedRow = row;
|
||||
}
|
||||
}
|
||||
|
||||
hasSelection(): boolean {
|
||||
return !!(this.content && this.content.selectedRow);
|
||||
}
|
||||
|
||||
moveSelectionUp() {
|
||||
if (this.content) {
|
||||
this.content.moveRow(this.content.selectedRow, -1);
|
||||
}
|
||||
}
|
||||
|
||||
moveSelectionDown() {
|
||||
if (this.content) {
|
||||
this.content.moveRow(this.content.selectedRow, 1);
|
||||
}
|
||||
}
|
||||
|
||||
addNewRow() {
|
||||
console.log('add new row clicked');
|
||||
}
|
||||
|
||||
deleteSelection() {
|
||||
if (this.content) {
|
||||
this.content.deleteRow(this.content.selectedRow);
|
||||
}
|
||||
}
|
||||
|
||||
editSelection() {
|
||||
console.log('edit selection clicked');
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user