ijpatricio / playground-wire-sortable

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Reproduction repository

The issue

Having a Livewire component app/Livewire/TaskList.php where each Task is also a compoenent. app/Livewire/ListItem.php, while having the list to be sortable with Drag and Drop using SortableJS. Using HTML5 native it's possible to achieve well, but it has no touchevents etc, so, no chance. Is it possible at all to make it work with this library?

What's going on?

The starting list has 3 tasks. We can drag however we want, no issues but one which is: when we drag any item to the bottom of the list.

The LW marker gets out of order and panics things! (Not LW fault, but it's a difficult circunstance having to have those markers.)

Up and running

You can use GitPod to have a fully running setup in under a minute: https://gitpod.io/?autostart=true#https://github.com/ijpatricio/playground-wire-sortable

Or setup, locally, the usual:

cp .env.example
composer install --ignore-platform-reqs
php artisan key:generate
touch database/database.sqlite
php artisan migrate:fresh --seed
php artisan serve
npm ci
npm run dev # or npm run build

About


Languages

Language:PHP 89.0%Language:Blade 8.2%Language:JavaScript 1.4%Language:SCSS 1.3%