Skip to content

Commit

Permalink
[added] createSelectedEvent for consistent onSelect handling
Browse files Browse the repository at this point in the history
  • Loading branch information
mtscout6 committed Jun 4, 2015
1 parent 5d40ab3 commit 2c46820
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 2c46820

Please sign in to comment.