asantibanez/livewire-status-board

Remove jQuery dependency

messerli90 opened this issue · 3 comments

I noticed the only place jQuery is being used is resources/views/sortable.blade.php

...
const fromOrderedIds = $(evt.from).children().map((index, child) => child.id).get();

const toOrderedIds = $(evt.to).children().map((index, child) => child.id).get();

I updated this locally to make it work without jQuery:

const fromOrderedIds = [].slice.call(evt.from.children).map((child, i) => child.id);

I can make a PR if you'd like

Hey @messerli90

That's interesting. Looking forward to the PR! 👍

Thanks @messerli90 for the suggested enhancement. I've just added it to v2.0.0. 👍