react-sortable-hoc icon indicating copy to clipboard operation
react-sortable-hoc copied to clipboard

Any idea the css trick to show content while dragging?

Open rchancey opened this issue 6 years ago • 3 comments

the examples are nice and finally found how to create the css and pull the styling from the story book. It would be nice to have the basic examples actually include a css.

But in any event.. I can't seem to get the list element to show while dragging.. any idea what the css trick is to show the element while dragging?

rchancey avatar Mar 22 '19 01:03 rchancey

the dragging element is a clone of the original component you are dragging but instead of being located in the dom where your original is, it's located by the end of the dom.

You can see it while you are dragging the element if your devtool is open and displaying the end of your html

macrigiuseppe avatar Mar 29 '19 00:03 macrigiuseppe

This cause the item to lost its own styles when the css rules are related to the parent container. Having a css rule like ul.list > li.item result in a broken style. In most cases UI library like semanticUI or bootstrap have these kind of rules. It there any way to set the root container where the element should be placed while moving ?

ovidius72 avatar Oct 11 '19 12:10 ovidius72

Never mind what I said in the previous comment. The helperContainer prop can be used to specify the htmlNode. Wonderful.

ovidius72 avatar Oct 11 '19 12:10 ovidius72