From 4b8a6b7a76ccadfd39ec037e282018c7d588dea8 Mon Sep 17 00:00:00 2001 From: Monika Date: Fri, 21 Jun 2019 11:31:34 -0400 Subject: about to make some big changes - things are working nicely --- src/client/views/search/CheckBox.tsx | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'src/client/views/search/CheckBox.tsx') diff --git a/src/client/views/search/CheckBox.tsx b/src/client/views/search/CheckBox.tsx index 9f0b75887..c75980e7c 100644 --- a/src/client/views/search/CheckBox.tsx +++ b/src/client/views/search/CheckBox.tsx @@ -78,15 +78,19 @@ export class CheckBox extends React.Component{ @action.bound reset() { - if(this.props.default){ - this._status = true; - this.checkTimeline.play(); - this.checkTimeline.restart(); + if (this.props.default) { + if (!this._status) { + this._status = true; + this.checkTimeline.play(); + this.checkTimeline.restart(); + } } - else{ - this._status = false; - this.uncheckTimeline.play(); - this.uncheckTimeline.restart(); + else { + if (this._status) { + this._status = false; + this.uncheckTimeline.play(); + this.uncheckTimeline.restart(); + } } this.props.updateStatus(this.props.default); -- cgit v1.2.3-70-g09d2