diff --git a/src/PaginationButton.js b/src/PaginationButton.js index 0238b5b9b7..e49e1344ca 100644 --- a/src/PaginationButton.js +++ b/src/PaginationButton.js @@ -2,6 +2,7 @@ import React from 'react'; import classNames from 'classnames'; import BootstrapMixin from './BootstrapMixin'; import createSelectedEvent from './utils/createSelectedEvent'; +import SafeAnchor from './SafeAnchor'; const PaginationButton = React.createClass({ mixins: [BootstrapMixin], @@ -25,9 +26,6 @@ const PaginationButton = React.createClass({ }, handleClick(event) { - // This would go away once SafeAnchor is available - event.preventDefault(); - if (this.props.onSelect) { let selectedEvent = createSelectedEvent(this.props.eventKey); this.props.onSelect(event, selectedEvent); @@ -35,14 +33,22 @@ const PaginationButton = React.createClass({ }, render() { - let classes = this.getBsClassSet(); + let classes = { + active: this.props.active, + disabled: this.props.disabled, + ...this.getBsClassSet() + }; - classes.active = this.props.active; - classes.disabled = this.props.disabled; + let { + className, + ...anchorProps // eslint-disable-line object-shorthand + } = this.props; return ( -
  • - {this.props.children} +
  • +
  • ); }