react-sortablejs icon indicating copy to clipboard operation
react-sortablejs copied to clipboard

[bug] ghost, chosen and dragClass do not work with css modules (but i found a fix)

Open gregg-cbs opened this issue 4 years ago • 0 comments

Describe the bug In nextJS we have been forced to use css modules as a means to style things which introduces one huge caveat, css does not work the conventional way, you have to apply the class to an html element up front otherwise the class is not included in the bundle.

This looks like so:

<ReactSortable 
chosenClass={style.categoryItemChosen}

In nextJS i cannot do this:

<ReactSortable 
chosenClass="categoryItemChosen"

But i have found that this works:

<ReactSortable 
chosenClass={`${styles.categoryItemChosen}`}

Maybe this is worth mentioning somewhere in the documentation?

gregg-cbs avatar Apr 20 '21 07:04 gregg-cbs