aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/search/CheckBox.tsx
diff options
context:
space:
mode:
authorMonika <monika_hedman@brown.edu>2019-06-21 11:31:34 -0400
committerMonika <monika_hedman@brown.edu>2019-06-21 11:31:34 -0400
commit4b8a6b7a76ccadfd39ec037e282018c7d588dea8 (patch)
tree162aa44ee6d2040362c5f178edd45f661169a6a7 /src/client/views/search/CheckBox.tsx
parent9f8b48837a202af92600fc2fe2d0de06baf0032b (diff)
about to make some big changes - things are working nicely
Diffstat (limited to 'src/client/views/search/CheckBox.tsx')
-rw-r--r--src/client/views/search/CheckBox.tsx20
1 files changed, 12 insertions, 8 deletions
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<CheckBoxProps>{
@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);