Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
onClick(e) {
const data = {articles: [{key: DraftJS.genKey()}], type: constants.PLUGIN_TYPE};
this.props.onChange(insertDataBlock(this.props.editorState, data));
}
_handleAddAnotherClick(event) {
event.preventDefault();
this.props.container.updateData(
{articles: this.props.data.articles.concat({key: DraftJS.genKey()})}
);
}