File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -37,12 +37,16 @@ const propTypes = {
37
37
* */
38
38
role : PropTypes . string ,
39
39
40
- /** The HTML href attribute for the `NavLink` */
40
+ /**
41
+ * The HTML href attribute for the `NavLink`. Used as the unique identifier
42
+ * for the `NavLink` if an `eventKey` is not provided.
43
+ */
41
44
href : PropTypes . string ,
42
45
43
46
/**
44
47
* Uniquely identifies the `NavItem` amongst its siblings,
45
48
* used to determine and control the active state of the parent `Nav`
49
+ * as well as onSelect behavior of a parent `Navbar`.
46
50
*/
47
51
eventKey : PropTypes . oneOfType ( [ PropTypes . string , PropTypes . number ] ) ,
48
52
Original file line number Diff line number Diff line change @@ -109,6 +109,9 @@ const propTypes = {
109
109
* Toggles `expanded` to `false` after the onSelect event of a descendant of a
110
110
* child `<Nav>` fires. Does nothing if no `<Nav>` or `<Nav>` descendants exist.
111
111
*
112
+ * `<NavLink>` descendants of `<Nav>` will not trigger the `onSelect` event unless
113
+ * an `eventKey` or `href` prop is defined.
114
+ *
112
115
* Manually controlling `expanded` via the onSelect callback is recommended instead,
113
116
* for more complex operations that need to be executed after
114
117
* the `select` event of `<Nav>` descendants.
You can’t perform that action at this time.
0 commit comments