Skip to content

Commit

Permalink
Merge pull request react-bootstrap#787 from react-bootstrap/selectEvent
Browse files Browse the repository at this point in the history
[added] `createSelectedEvent` for consistent onSelect handling
  • Loading branch information
mtscout6 committed Jun 5, 2015
2 parents 54dd9fa + 2c46820 commit d9b08d3
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/utils/createSelectedEvent.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
export default function createSelectedEvent(eventKey) {
let selectionPrevented = false;

return {
eventKey,

preventSelection() {
selectionPrevented = true;
},

isSelectionPrevented() {
return selectionPrevented;
}
};
}

0 comments on commit d9b08d3

Please sign in to comment.