File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11var panelInstance = (
2- < Panel header = "Panel heading" >
2+ < Panel collapsable defaultExpanded header = "Panel heading" >
33 Some default panel content here.
44 < ListGroup fill >
55 < ListGroupItem > Item 1</ ListGroupItem >
Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ var Panel = React.createClass({
4242 } ,
4343
4444 getCollapsableDimensionValue : function ( ) {
45- return this . refs . body . getDOMNode ( ) . offsetHeight ;
45+ return this . refs . panel . getDOMNode ( ) . scrollHeight ;
4646 } ,
4747
4848 getCollapsableDOMNode : function ( ) {
@@ -80,19 +80,7 @@ var Panel = React.createClass({
8080 var bodyElements = [ ] ;
8181
8282 function getProps ( ) {
83- var index = bodyElements . length ;
84- var props = { key : index } ;
85-
86- // Arbitrarily assign the body ref to the first element. We can't wrap
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.
91- if ( index == 0 ) {
92- props . ref = 'body' ;
93- }
94-
95- return props ;
83+ return { key : bodyElements . length } ;
9684 }
9785
9886 function addPanelBody ( children ) {
You can’t perform that action at this time.
0 commit comments