MCPcopy Create free account
hub / github.com/Autodesk/react-base-table / renderExpandIcon

Method renderExpandIcon

src/BaseTable.js:314–323  ·  view source on GitHub ↗
({ rowData, rowIndex, depth, onExpand })

Source from the content-addressed store, hash-verified

312 }
313
314 renderExpandIcon({ rowData, rowIndex, depth, onExpand }) {
315 const { rowKey, expandColumnKey, expandIconProps } = this.props;
316 if (!expandColumnKey) return null;
317
318 const expandable = rowIndex >= 0 && hasChildren(rowData);
319 const expanded = rowIndex >= 0 && this.getExpandedRowKeys().indexOf(rowData[rowKey]) >= 0;
320 const extraProps = callOrReturn(expandIconProps, { rowData, rowIndex, depth, expandable, expanded });
321 const ExpandIcon = this._getComponent('ExpandIcon');
322
323 return <ExpandIcon depth={depth} expandable={expandable} expanded={expanded} {...extraProps} onExpand={onExpand} />;
324 }
325
326 renderRow({ isScrolling, columns, rowData, rowIndex, style }) {

Callers

nothing calls this directly

Calls 3

getExpandedRowKeysMethod · 0.95
hasChildrenFunction · 0.90
callOrReturnFunction · 0.90

Tested by

no test coverage detected