mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
Fix filterList is shown twice
This commit is contained in:
@@ -82,7 +82,7 @@ export class ActivitiProcessFilters implements OnInit, OnChanges {
|
|||||||
|
|
||||||
ngOnChanges(changes: SimpleChanges) {
|
ngOnChanges(changes: SimpleChanges) {
|
||||||
let appId = changes['appId'];
|
let appId = changes['appId'];
|
||||||
if (appId && appId.currentValue) {
|
if (appId && (appId.currentValue || appId.currentValue === null)) {
|
||||||
this.load();
|
this.load();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -93,7 +93,6 @@ export class ActivitiProcessFilters implements OnInit, OnChanges {
|
|||||||
* @param tasks
|
* @param tasks
|
||||||
*/
|
*/
|
||||||
private load() {
|
private load() {
|
||||||
this.resetFilter();
|
|
||||||
if (this.appName) {
|
if (this.appName) {
|
||||||
this.filterByAppName();
|
this.filterByAppName();
|
||||||
} else {
|
} else {
|
||||||
@@ -104,6 +103,7 @@ export class ActivitiProcessFilters implements OnInit, OnChanges {
|
|||||||
private filterByAppId(appId) {
|
private filterByAppId(appId) {
|
||||||
this.activiti.getProcessFilters(appId).subscribe(
|
this.activiti.getProcessFilters(appId).subscribe(
|
||||||
(res: FilterRepresentationModel[]) => {
|
(res: FilterRepresentationModel[]) => {
|
||||||
|
this.resetFilter();
|
||||||
res.forEach((filter) => {
|
res.forEach((filter) => {
|
||||||
this.filterObserver.next(filter);
|
this.filterObserver.next(filter);
|
||||||
});
|
});
|
||||||
|
@@ -82,7 +82,7 @@ export class ActivitiFilters implements OnInit, OnChanges {
|
|||||||
|
|
||||||
ngOnChanges(changes: SimpleChanges) {
|
ngOnChanges(changes: SimpleChanges) {
|
||||||
let appId = changes['appId'];
|
let appId = changes['appId'];
|
||||||
if (appId) {
|
if (appId && (appId.currentValue || appId.currentValue === null)) {
|
||||||
this.load();
|
this.load();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -93,7 +93,6 @@ export class ActivitiFilters implements OnInit, OnChanges {
|
|||||||
* @param tasks
|
* @param tasks
|
||||||
*/
|
*/
|
||||||
private load() {
|
private load() {
|
||||||
this.resetFilter();
|
|
||||||
if (this.appName) {
|
if (this.appName) {
|
||||||
this.filterByAppName();
|
this.filterByAppName();
|
||||||
} else {
|
} else {
|
||||||
@@ -104,6 +103,7 @@ export class ActivitiFilters implements OnInit, OnChanges {
|
|||||||
private filterByAppId(appId) {
|
private filterByAppId(appId) {
|
||||||
this.activiti.getTaskListFilters(appId).subscribe(
|
this.activiti.getTaskListFilters(appId).subscribe(
|
||||||
(res: FilterRepresentationModel[]) => {
|
(res: FilterRepresentationModel[]) => {
|
||||||
|
this.resetFilter();
|
||||||
res.forEach((filter) => {
|
res.forEach((filter) => {
|
||||||
this.filterObserver.next(filter);
|
this.filterObserver.next(filter);
|
||||||
this.selectFirstFilter();
|
this.selectFirstFilter();
|
||||||
|
Reference in New Issue
Block a user