Skip to content

Commit dff5a47

Browse files
committed
feat(SortableContainer): adds height property to helper style
Height defined in getHelperStyle() was not applied to the helper.
1 parent 94631b9 commit dff5a47

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/SortableContainer/index.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ export default function sortableContainer(WrappedComponent, config = {withRef: f
4444
},
4545
lockToContainerEdges: false,
4646
lockOffset: '50%',
47-
getHelperDimensions: ({node}) => ({
48-
width: node.offsetWidth,
49-
height: node.offsetHeight
47+
getHelperDimensions: ({node}) => ({
48+
width: node.offsetWidth,
49+
height: node.offsetHeight
5050
})
5151
};
5252

@@ -183,7 +183,7 @@ export default function sortableContainer(WrappedComponent, config = {withRef: f
183183

184184
this.node = node;
185185
this.margin = margin;
186-
this.width = dimensions.width;
186+
this.width = dimensions.width;
187187
this.height = dimensions.height;
188188
this.marginOffset = {
189189
x: this.margin.left + this.margin.right,
@@ -210,6 +210,7 @@ export default function sortableContainer(WrappedComponent, config = {withRef: f
210210
this.helper.style.top = `${this.boundingClientRect.top - margin.top}px`;
211211
this.helper.style.left = `${this.boundingClientRect.left - margin.left}px`;
212212
this.helper.style.width = `${this.width}px`;
213+
this.helper.style.height = `${this.height}px`;
213214
this.helper.style.boxSizing = 'border-box';
214215

215216
if (hideSortableGhost) {

0 commit comments

Comments
 (0)