-
Notifications
You must be signed in to change notification settings - Fork 269
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[AAE-25268] emit filter key when it's value increased or decreased #10186
[AAE-25268] emit filter key when it's value increased or decreased #10186
Conversation
@@ -204,4 +212,15 @@ export class TaskFiltersCloudComponent extends BaseTaskFiltersCloudComponent imp | |||
this.filters = []; | |||
this.currentFilter = undefined; | |||
} | |||
|
|||
checkIfFilterValuesHasBeenUpdated(filterKey: string, filterValue: number) { | |||
if (!this.currentFiltersValues[filterKey]) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can sort out these condition to have a less branched method
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (!this.currentFiltersValues[filterKey]) { | |
if (this.currentFiltersValues[filterKey] !== filterValue) { | |
this.currentFiltersValues[filterKey] = filterValue; // you can improve this part to change the filter update only when needed | |
if (this.currentFiltersValues[filterKey]) { | |
this.updatedFilter.emit(filterKey); | |
} | |
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -204,4 +212,15 @@ export class TaskFiltersCloudComponent extends BaseTaskFiltersCloudComponent imp | |||
this.filters = []; | |||
this.currentFilter = undefined; | |||
} | |||
|
|||
checkIfFilterValuesHasBeenUpdated(filterKey: string, filterValue: number) { | |||
if (!this.currentFiltersValues[filterKey]) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (!this.currentFiltersValues[filterKey]) { | |
if (this.currentFiltersValues[filterKey] !== filterValue) { | |
this.currentFiltersValues[filterKey] = filterValue; // you can improve this part to change the filter update only when needed | |
if (this.currentFiltersValues[filterKey]) { | |
this.updatedFilter.emit(filterKey); | |
} | |
} |
0f98cf5
to
e8499af
Compare
@@ -45,10 +45,6 @@ export abstract class BaseTaskFiltersCloudComponent implements OnDestroy { | |||
@Output() | |||
error: EventEmitter<any> = new EventEmitter<any>(); | |||
|
|||
/** Emitted when filter is updated. */ | |||
@Output() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why removing this from here? this is in the base component that is being extended from the cloud one
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
base component has only two outputs. Content-ee-apa is using TaskFiltersCloudComponent. Component TaskFiltersCloudComponent has also similar outputs like: filterSelected, filterClicked, filterCounterUpdated.
e8499af
to
c148d41
Compare
Quality Gate passedIssues Measures |
Please check if the PR fulfills these requirements
What kind of change does this PR introduce? (check one with "x")
What is the current behaviour? (You can also link to an open issue here)
What is the new behaviour?
https://hyland.atlassian.net/browse/AAE-25268
Does this PR introduce a breaking change? (check one with "x")
If this PR contains a breaking change, please describe the impact and migration path for existing applications: ...
Other information: