Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
<button aria-label="{label}">
<span aria-hidden="true" tabindex="-1">
•
</span>
</button>
)
}
})
// By default, the loading text is always present and read by screen readers, even
// when hidden. Hide the loading text completely to prevent it from being read.
const DefaultLoadingComponent = ReactTableDefaults.LoadingComponent
Object.assign(ReactTableDefaults, {
LoadingComponent({ loading, ...rest }) {
return loading ? DefaultLoadingComponent({ loading, ...rest }) : null
}
})
ReactTable.propTypes = fixedReactTablePropTypes
// Prevent unnecessary data updates on table rerenders by doing a deep comparison
// of data props rather than a === comparison. Kind of ugly, but significantly
// increases performance when selecting or expanding rows in a very large table.
ReactTable.prototype.oldComponentWillReceiveProps = ReactTable.prototype.componentWillReceiveProps
ReactTable.prototype.componentWillReceiveProps = function(newProps, newState) {
newProps = { ...newProps }
if (this.props.dataKey && this.props.dataKey === newProps.dataKey) {
newProps.data = this.props.data