MCPcopy Index your code
hub / github.com/react-dates/react-dates / getFirstVisibleIndex

Method getFirstVisibleIndex

src/components/DayPicker.jsx:663–677  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

661 }
662
663 getFirstVisibleIndex() {
664 const { orientation } = this.props;
665 const { monthTransition } = this.state;
666
667 if (orientation === VERTICAL_SCROLLABLE) return 0;
668
669 let firstVisibleMonthIndex = 1;
670 if (monthTransition === PREV_TRANSITION) {
671 firstVisibleMonthIndex -= 1;
672 } else if (monthTransition === NEXT_TRANSITION) {
673 firstVisibleMonthIndex += 1;
674 }
675
676 return firstVisibleMonthIndex;
677 }
678
679 getFocusedDay(newMonth) {
680 const { getFirstFocusableDay, numberOfMonths } = this.props;

Callers 1

renderMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected