Skip to content

Commit f404438

Browse files
committed
Expandable - fix for vertical open height
1 parent 57499ec commit f404438

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,3 +70,7 @@
7070
- CalendarHeader - adding 'firstDay' (PR #826), 'monthFormat' (PR #787) and 'weekNumbers' to shouldComponentUpdate.
7171
- Agenda - adding support for weekdays name's 'fontSize', 'fontFamily' and 'fontWeight' (PR #711).
7272
- ReservationList - adding support for Day number's 'fontFamily', and to Day text's 'fontFamily' and 'fontWeight' (PR #711).
73+
74+
## [1.203.0] - 2019-07-31
75+
### Fix
76+
- ExpandableCalendar - fix for vertical open height.

src/expandableCalendar/index.js

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,9 @@ class ExpandableCalendar extends Component {
167167

168168
/** Utils */
169169
getOpenHeight() {
170+
if (!this.props.horizontal) {
171+
return commons.screenHeight;
172+
}
170173
return CLOSED_HEIGHT + (WEEK_HEIGHT * (this.numberOfWeeks - 1)) + (this.props.hideKnob ? 12 : KNOB_CONTAINER_HEIGHT);
171174
}
172175

@@ -363,13 +366,6 @@ class ExpandableCalendar extends Component {
363366
}
364367
}
365368

366-
onLayout = ({nativeEvent}) => {
367-
const x = nativeEvent.layout.x;
368-
if (!this.props.horizontal) {
369-
this.openHeight = commons.screenHeight - x - (commons.screenHeight * 0.1);
370-
}
371-
}
372-
373369
/** Renders */
374370

375371
renderWeekDaysNames() {
@@ -467,7 +463,6 @@ class ExpandableCalendar extends Component {
467463
ref={e => {this.wrapper = e;}}
468464
style={{height: deltaY}}
469465
{...this.panResponder.panHandlers}
470-
onLayout={this.onLayout}
471466
>
472467
<CalendarList
473468
testID="calendar"

0 commit comments

Comments
 (0)