Currently I am using Lodash decorator to delay a service call on drop down value change. In the select tag, I did something as follows:
(onSelectionChange)="logUserSearchData()"
In the TypeScript file, I've the following:
logUserSearchData() {
logService();
}
@Debounce(10000)
logService() {
this.logService().subscribe();
}
In the above code snippet, the logService() is triggered after 10s whenever there's a change in drop down or value change. Is there a way in RxJS to do the same without using the Lodash decorator?