From be0b9ba09e6d19c975e8ac6a97f23a5803c0b361 Mon Sep 17 00:00:00 2001 From: Julia Friesel Date: Thu, 14 Jun 2018 14:49:45 +0200 Subject: [PATCH] Rename showView callback --- bleeding.js | 8 ++++---- cycle-day-overview.js | 6 +++--- cycle-day.js | 8 ++++---- temperature.js | 8 ++++---- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/bleeding.js b/bleeding.js index 7fb32ab..2854aeb 100644 --- a/bleeding.js +++ b/bleeding.js @@ -14,7 +14,7 @@ export default class Bleeding extends Component { constructor(props) { super(props) this.cycleDay = props.cycleDay - this.bringIntoView = props.bringIntoView + this.showView = props.bringIntoView let bleedingValue = this.cycleDay.bleeding && this.cycleDay.bleeding.value if (! (typeof bleedingValue === 'number') ){ bleedingValue = -1 @@ -51,13 +51,13 @@ export default class Bleeding extends Component { }} value={this.state.exclude} /> @@ -67,7 +67,7 @@ export default class Bleeding extends Component { value: this.state.currentValue, exclude: this.state.exclude }) - this.bringIntoView('dayView') + this.showView('dayView') }} disabled={ this.state.currentValue === -1 } title="Save"> diff --git a/cycle-day-overview.js b/cycle-day-overview.js index ac73006..bafe44e 100644 --- a/cycle-day-overview.js +++ b/cycle-day-overview.js @@ -15,7 +15,7 @@ export default class DayView extends Component { constructor(props) { super(props) this.cycleDay = props.cycleDay - this.bringIntoView = props.bringIntoView + this.showView = props.bringIntoView bleedingDaysSortedByDate.addListener(setStateWithCurrentCycleDayNumber.bind(this)) } @@ -46,11 +46,11 @@ export default class DayView extends Component { {bleedingLabel} {temperatureLabel} diff --git a/cycle-day.js b/cycle-day.js index 35d887d..f16fb85 100644 --- a/cycle-day.js +++ b/cycle-day.js @@ -22,7 +22,7 @@ export default class Day extends Component { visibleComponent: 'dayView', } - this.bringIntoView = view => { + this.showView = view => { this.setState({visibleComponent: view}) } } @@ -33,9 +33,9 @@ export default class Day extends Component { {formatDateForViewHeader(this.cycleDay.date)} { this.cycleDayNumber && Cycle day {this.cycleDayNumber} } { - { dayView: , - bleedingEditView: , - temperatureEditView: + { dayView: , + bleedingEditView: , + temperatureEditView: }[this.state.visibleComponent] } diff --git a/temperature.js b/temperature.js index 5bf20c3..fe2a9a7 100644 --- a/temperature.js +++ b/temperature.js @@ -13,7 +13,7 @@ export default class Temp extends Component { constructor(props) { super(props) this.cycleDay = props.cycleDay - this.bringIntoView = props.bringIntoView + this.showView = props.bringIntoView let initialValue if(this.cycleDay.temperature) { @@ -51,14 +51,14 @@ export default class Temp extends Component { /> @@ -68,7 +68,7 @@ export default class Temp extends Component { value: Number(this.state.currentValue), exclude: this.state.exclude }) - this.bringIntoView('dayView') + this.showView('dayView') }} disabled={ this.state.currentValue === '' } title="Save">