Closed gtluszcz closed 3 years ago
Thanks for this contribution. I'm fine with this change, however I'd make this new prop optional and default it to div to avoid the breaking change.
This was published under https://github.com/ricardo-ch/react-easy-sort/releases/tag/v1.3.0
Hi! Lately, we have wanted to use
react-easy-sort
inside<p>
element. Quickly we found out that componentSortableItems
uses<div>
under the hood. As it's widely known div cannot appear as a descendant of p. Together with my coworker, we figured out it would be awesome to be able to customize the HTML tag for the container component.valid usecases include:
as="div"
as="ul"
as="span"
This PR introduces breaking change. You need to provide new prop
as
Edit: The
as
prop is now optional and defaults todiv