From d257ed459de75811622a67cee210e8196125c8b5 Mon Sep 17 00:00:00 2001 From: David Kebler Date: Thu, 18 Jun 2020 14:59:05 -0700 Subject: [PATCH] 0.1.5 add per rx add skip option, by default is will be skip none, emit last value upon subscription --- package.json | 2 +- src/rx-class.js | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 6132b19..437f55b 100644 --- a/package.json +++ b/package.json @@ -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": { diff --git a/src/rx-class.js b/src/rx-class.js index 853235a..b87ab2f 100644 --- a/src/rx-class.js +++ b/src/rx-class.js @@ -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))