Created
December 9, 2020 02:21
-
-
Save debugmodedotnet/906958877996e785b94e24990276f9b0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private filterDataSource: BehaviorSubject<Array<any>> = new BehaviorSubject([]); | |
public filterData = this.filterDataSource.asObservable(); | |
updateUserData(data) { | |
this.filterDataSource.next(data); | |
} | |
addData(dataObj) { | |
const currentValue = this.filterDataSource.value; | |
const updatedValue = [...currentValue, dataObj]; | |
this.filterDataSource.next(updatedValue); | |
} | |
constructor() { } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment