Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
private handleColorChange = ( color: string ): void => {
const { wordings } = this.state
const { columnHeader, templateChangeHandler } = this.props
if ( isValidColorCode( color ) ) {
let template: DisplayTemplate = {}
template[columnHeader.id] = {
color
}
templateChangeHandler( template )
window.setTimeout( this.updateContextMenu, 250 )
}
else {
this.props.displayNotification( {
title: wordings['error'],
message: wordings['invalidColorCode'],
level: 'error'
} )