Answer the question
In order to leave comments, you need to log in
How to exclude a repeated click event?
I have several components in the template of which the event <div (click)="edit(obj)"></div>
of the Same type handler is bound:
public edit(actdoc: any): void {
this.applicationRelationShipsService
.get(actdoc.actdocid)
.pipe(
indicate(this.loading$),
observableTimestampResponse(),
switchMap((actdoc) =>
this.dialog
.open(DialogAddExistingRelationshipDetailsComponent, {
...this.dialogConfig,
height: '480px',
data: { appid: this.application.appid, mode: MODES.EDIT, actdoc },
})
.afterClosed()
.pipe(
filter(Boolean),
concatMap(() => this.applicationRelationShipsService.getByAppId(this.application.appid)),
),
),
)
.subscribe((actdocs) => {
this.actdocs = actdocs.slice();
this.changeDetection.detectChanges();
});
}
this.applicationRelationShipsService.get
. until the dialog opens and then closes. Otherwise, a request error will not occur.
Answer the question
In order to leave comments, you need to log in
event.pipe(
exhaustMap(() => someFiniteAction)
)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question