Open tlrib opened 1 month ago
Great library!
I have an use case where I would need to use it with an additional wrapper div between the swapy-slot and swapy-item like so:
swapy-slot
swapy-item
<div class="section-1" data-swapy-slot="slot1"> <div id="mydummydiv"> <div class="content-a" data-swapy-item="item1"> <!-- Your content for content-a goes here --> </div> </div> </div>
When I do it like this, I get this error:
It looks to me that this is happening because of this validation that only takes into account the first child:
https://github.com/TahaSh/swapy/blob/d348da360ed1c7d7cb9c277b8b4dcbfe40db93c7/src/instance.ts#L50
Is it possible for this validation to be relaxed?
Thanks!
Great library!
I have an use case where I would need to use it with an additional wrapper div between the
swapy-slot
andswapy-item
like so:When I do it like this, I get this error:
It looks to me that this is happening because of this validation that only takes into account the first child:
https://github.com/TahaSh/swapy/blob/d348da360ed1c7d7cb9c277b8b4dcbfe40db93c7/src/instance.ts#L50
Is it possible for this validation to be relaxed?
Thanks!