Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

clear selection when nothing selected from show changes drop down

bsatarnejada383bf31f035
diff --git a/frontend/src/app/features/work-packages/components/wp-baseline/baseline/baseline.component.html b/frontend/src/app/features/work-packages/components/wp-baseline/baseline/baseline.component.html
index 2a94e96b82f..49b2ada3e1e 100644
--- a/frontend/src/app/features/work-packages/components/wp-baseline/baseline/baseline.component.html
+++ b/frontend/src/app/features/work-packages/components/wp-baseline/baseline/baseline.component.html
@@ -14,7 +14,7 @@
>
<option [textContent]="text.drop_down_none_option"
[selected]="!filterSelected"
- [value]=""></option>
+ [value]="'-'"></option>
<option
*ngFor="let availableValue of baselineAvailableValues"
[value]="availableValue.value"
@@ -62,13 +62,13 @@
<div class="spot-action-bar--right">
<button
class="button spot-action-bar--action"
+ [disabled]="!filterSelected"
type="button"
(click)="clearSelection()"
>
{{ text.clear }}
</button>
<button
- [disabled]="!filterSelected"
class="button -highlight spot-action-bar--action"
>
{{ text.apply }}
diff --git a/frontend/src/app/features/work-packages/components/wp-baseline/baseline/baseline.component.ts b/frontend/src/app/features/work-packages/components/wp-baseline/baseline/baseline.component.ts
index 4baf1bdbe2b..b40e08eb82f 100644
--- a/frontend/src/app/features/work-packages/components/wp-baseline/baseline/baseline.component.ts
+++ b/frontend/src/app/features/work-packages/components/wp-baseline/baseline/baseline.component.ts
@@ -71,7 +71,7 @@ export class OpBaselineComponent extends UntilDestroyedMixin implements OnInit {
public selectedTime = '00:00';
- public selectedFilter = '';
+ public selectedFilter = '-';
public selectedTimezoneFormattedTime = '';
@@ -151,7 +151,7 @@ export class OpBaselineComponent extends UntilDestroyedMixin implements OnInit {
this.timeZoneSelected = false;
this.selectedTime = '0:00';
this.selectedDate = '';
- this.selectedFilter = '';
+ this.selectedFilter = '-';
this.dropDownDescription = '';
}
@@ -238,7 +238,7 @@ export class OpBaselineComponent extends UntilDestroyedMixin implements OnInit {
}
public filterChange(value:string):void {
- if (value !== '') {
+ if (value !== '-') {
this.filterSelected = true;
this.selectedFilter = value;
switch (value) {
@@ -259,8 +259,7 @@ export class OpBaselineComponent extends UntilDestroyedMixin implements OnInit {
break;
}
} else {
- this.filterSelected = false;
- this.dropDownDescription = '';
+ this.clearSelection();
}
}
}