File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed
packages/react-bootstrap-table2/src Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -83,7 +83,9 @@ class BootstrapTable extends PropsBaseResolver(Component) {
8383
8484 const hasFooter = _ . filter ( columns , col => _ . has ( col , 'footer' ) ) . length > 0 ;
8585
86- const tableCaption = ( caption && < Caption > { caption } </ Caption > ) ;
86+ const tableCaption = (
87+ caption && < Caption bootstrap4 = { bootstrap4 } > { caption } </ Caption >
88+ ) ;
8789
8890 return (
8991 < div className = { tableWrapperClass } >
Original file line number Diff line number Diff line change @@ -4,16 +4,22 @@ import PropTypes from 'prop-types';
44
55const Caption = ( props ) => {
66 if ( ! props . children ) return null ;
7- return (
8- < caption > { props . children } </ caption >
7+
8+ const caption = props . bootstrap4 ? (
9+ < caption style = { { captionSide : 'top' } } > { props . children } </ caption >
10+ ) : (
11+ < caption > { props . children } </ caption >
912 ) ;
13+
14+ return caption ;
1015} ;
1116
1217Caption . propTypes = {
1318 children : PropTypes . oneOfType ( [
1419 PropTypes . node ,
1520 PropTypes . string
16- ] )
21+ ] ) ,
22+ bootstrap4 : PropTypes . bool
1723} ;
1824
1925export default Caption ;
You can’t perform that action at this time.
0 commit comments