MCPcopy Create free account
hub / github.com/AllenFang/react-bootstrap-table / renderSelectRowHeader

Method renderSelectRowHeader

src/TableHeader.js:136–161  ·  view source on GitHub ↗
(rowCount, rowKey)

Source from the content-addressed store, hash-verified

134 }
135
136 renderSelectRowHeader(rowCount, rowKey) {
137 if (this.props.hideSelectColumn) {
138 return null;
139 } else if (this.props.customComponent) {
140 const CustomComponent = this.props.customComponent;
141 return (
142 <SelectRowHeaderColumn key={ rowKey } rowCount={ rowCount }>
143 <CustomComponent type='checkbox' checked={ this.props.isSelectAll }
144 indeterminate={ this.props.isSelectAll === 'indeterminate' } disabled={ false }
145 onChange={ this.props.onSelectAllRow } rowIndex='Header'/>
146 </SelectRowHeaderColumn>
147 );
148 } else if (this.props.rowSelectType === Const.ROW_SELECT_SINGLE) {
149 return (<SelectRowHeaderColumn key={ rowKey } rowCount={ rowCount }/>);
150 } else if (this.props.rowSelectType === Const.ROW_SELECT_MULTI) {
151 return (
152 <SelectRowHeaderColumn key={ rowKey } rowCount={ rowCount }>
153 <Checkbox
154 onChange={ this.props.onSelectAllRow }
155 checked={ this.props.isSelectAll }/>
156 </SelectRowHeaderColumn>
157 );
158 } else {
159 return null;
160 }
161 }
162}
163TableHeader.propTypes = {
164 headerContainerClass: PropTypes.string,

Callers 1

renderMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected