Skip to content
Snippets Groups Projects
Commit 0d24cea8 authored by François Grand's avatar François Grand
Browse files

feat: add flag to enable move up/down arrows in fieldsets

refs #522
parent d6c704c2
No related branches found
No related tags found
1 merge request!166Resolve "Prébarrages: Regroupement de la saisie des bassins"
......@@ -21,6 +21,7 @@ export class BasinFieldsetContainerComponent extends FieldsetContainerComponent
// disable "add" button (and "how many children" select)
this._fieldsetComponents.forEach(fs => {
fs.showAddChildren = false;
fs.showMoveArrows = false;
});
}
}
......@@ -22,11 +22,11 @@
[title]="uitextRemoveStructure">
<mat-icon>delete</mat-icon>
</button>
<button type="button" mat-icon-button [disabled]="! enableUpButton" (click)="onMoveUpClick()"
<button *ngIf="showMoveArrows" type="button" mat-icon-button [disabled]="! enableUpButton" (click)="onMoveUpClick()"
[title]="uitextMoveStructureUp">
<mat-icon>arrow_upward</mat-icon>
</button>
<button type="button" mat-icon-button [disabled]="! enableDownButton" (click)="onMoveDownClick()"
<button *ngIf="showMoveArrows" type="button" mat-icon-button [disabled]="! enableDownButton" (click)="onMoveDownClick()"
[title]="uitextMoveStructureDown">
<mat-icon>arrow_downward</mat-icon>
</button>
......
......@@ -31,6 +31,9 @@ export class FieldSetComponent implements DoCheck {
/** flag to show/hide "add" button (and "how many children" select */
public showAddChildren: boolean = true;
/** flag to show/hide "move up" and "move down" buttons */
public showMoveArrows: boolean = true;
@Input()
public set fieldSet(fs: FieldSet) {
this._fieldSet = fs;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment