Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
private handleKeyChange = ( event: any ) => {
if ( isValidKeyChar( event.target.value ) || !event.target.value ) {
let idx = event.currentTarget.getAttribute( 'data-idx' )
let keyValueStore = this.getKeyValueStore( this.props.keyValues )
keyValueStore[idx] = {
key: event.target.value,
contentType: keyValueStore[idx].contentType,
contentBytes: keyValueStore[idx].contentBytes
}
this.props.handleChange( this.getKeyValuesObject( keyValueStore ) )
}
}
private handleKeyChange = ( event: any ) => {
if ( isValidKeyChar( event.target.value ) || !event.target.value ) {
let idx = event.currentTarget.getAttribute( 'data-idx' )
let keyValueStore = this.getKeyValueStore( this.props.keyValues )
keyValueStore[idx] = {
key: event.target.value,
contentType: keyValueStore[idx].contentType,
contentBytes: keyValueStore[idx].contentBytes
}
this.props.handleChange( this.getKeyValuesObject( keyValueStore ) )
}
}