Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
if (React.isValidElement(value)) {
content = value
} else if (col.html) {
// Render inline to align with the expander
content = <div value="" style="{{">
} else {
content = value != null ? String(value) : ''
}
// Render expander for custom row details
let expander
if (col.details) {
if (col.details instanceof Array && col.details[cellInfo.index] == null) {
// Don't expand rows without content
} else {
expander = ReactTableDefaults.ExpanderComponent({
...cellInfo,
isExpanded: isExpanded(cellInfo)
})
}
}
if (expander) {
return (
{expander}
{content}
)
}
return content
}</div>