Closed jannnik closed 3 years ago
@jannnik Thank you for the feature request.
I have just implemented the feature in the following CodeSandbox, is it working as you intended?
https://codesandbox.io/s/full-features-issue-59-twpze
I made it possible to specify classes.listItem. I also specified classes.root to have the same effect for dropping to the root.
The following two files are related to this feature. https://codesandbox.io/s/full-features-issue-59-twpze?file=/src/App.tsx https://codesandbox.io/s/full-features-issue-59-twpze?file=/src/App.module.css
If this is OK, publish it as v1.5.3.
@minop1205 Great, it works as expected! Thank you!
@jannnik Thank you your verification! I merged it and published as v1.5.3
Feature request
Summary
Allow styling of the listItemComponent when it is not a dragSource or dropTarget.
Purpose / Reason
We want to add a dashed 1px border to the listItemComponent when it is a dropTarget. To prevent the items from jumping around while dragging, we also need to add a transparent 1px border to all listItemComponents. Unfortunately, it is not possible to style the listItemComponent via the
classes
property.If you have an implementation idea.
Allow setting default styles of the listItemComponent via the
classes
property.Reference information
https://github.com/minop1205/react-dnd-treeview#component-styling