Skip to content

Commit 76f769a

Browse files
author
Benjamin Kniffler
committed
Fix some more names in draft-js-dnd-plugin
1 parent ccd9523 commit 76f769a

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

draft-js-dnd-plugin/src/components/block-alignment-wrapper.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ const getDisplayName = (WrappedComponent) => (
66
);
77

88
// Export
9-
export default function WrapComponent(C) {
9+
export default function WrapComponent(WrappedComponent) {
1010
return class Wrapper extends Component {
11-
static displayName = `Decorated(${getDisplayName(C)})`;
11+
static displayName = `Decorated(${getDisplayName(WrappedComponent)})`;
1212
static defaultProps = {
1313
draggable: true,
1414
readOnly: false,
@@ -26,7 +26,7 @@ export default function WrapComponent(C) {
2626
render() {
2727
const { blockProps } = this.props;
2828
return (
29-
<C {...this.props}
29+
<WrappedComponent {...this.props}
3030
alignment={blockProps.alignment}
3131
align={this.align}
3232
/>

draft-js-dnd-plugin/src/components/block-draggable-wrapper.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,11 @@ export default function WrapComponent(component, options) {
1212
};
1313

1414
// Handle start-drag and setData with blockKey
15-
startDrag(e) {
16-
const event = e;
15+
startDrag(event) {
1716
const allow = this.props.draggable && !this.props.readOnly;
1817
if (!allow) return;
1918

20-
event.dataTransfer.dropEffect = 'move';
19+
event.dataTransfer.dropEffect = 'move'; // eslint-disable-line no-param-reassign
2120

2221
// Declare data and give info that its an existing key and a block needs to be moved
2322
event.dataTransfer.setData('text', `${DRAFTJS_BLOCK_KEY}:${this.props.block.key}`);

draft-js-dnd-plugin/src/components/dnd-wrapper.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ export default function WrapComponent(WrappedComponent, plugin) {
4040
this.setState({ isDragging: false });
4141
};
4242

43-
onProgress = (e) => {
44-
this.setState({ progress: e, isDragging: false });
43+
onProgress = (event) => {
44+
this.setState({ progress: event, isDragging: false });
4545
};
4646

4747
render() {

0 commit comments

Comments
 (0)