0.1.5 add per rx add skip option, by default is will be skip none, emit last value upon subscription

master
David Kebler 2020-06-18 14:59:05 -07:00
parent f9e71b443c
commit d257ed459d
2 changed files with 2 additions and 3 deletions

View File

@ -1,6 +1,6 @@
{
"name": "@uci-utils/rx-class",
"version": "0.1.4",
"version": "0.1.5",
"description": "class that support reactive properites",
"main": "src/rx-class.js",
"scripts": {

View File

@ -78,8 +78,7 @@ export default class RxClass extends EventEmitter {
if (opts.amend_path || this._rx_.amend_path) rx.amendValue = (value,path) => {return {value:value, path: path}}
// console.log(path,': initial value===>',rx.amendValue(rx.value,rx.path))
rx.obs = from(new BehaviorSubject(rx.amendValue(rx.value,rx.path)).pipe(
// rx.obs = from(new ReplaySubject(1).pipe(
skip(this._rx_.skip),
skip(opts.skip != null ? opts.skip : this._rx_.skip),
distinctUntilChanged()
// ,
// takeUntil($get(this.$deleted,path))