Skip to content

Commit 376485e

Browse files
author
Jimmy Jia
committed
Clarify comment for body ref assignment
For react-bootstrap#228
1 parent 44f6e07 commit 376485e

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

src/Panel.jsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,10 @@ var Panel = React.createClass({
8484
var props = {key: index};
8585

8686
// Arbitrarily assign the body ref to the first element. We can't wrap
87-
// all body elements in a single DOM node anyway, because the fill
88-
// styling depends on the table or list group element being a direct
89-
// descendant of the panel.
87+
// all body elements in a single DOM node, because the selector for the
88+
// panel-filling behavior in Bootstrap looks like ".panel>.list-group",
89+
// which will not work if there are any DOM nodes between the ".panel"
90+
// element and the ".list-group" element.
9091
if (index == 0) {
9192
props.ref = 'body';
9293
}

0 commit comments

Comments
 (0)