getIndex () {
    return this.state.index !== null ? this.state.index : this.props.index;
  }