nova-sortable icon indicating copy to clipboard operation
nova-sortable copied to clipboard

Issues when using with Octane and Duplicates item

Open g124578g opened this issue 1 year ago • 2 comments

The first issue is that when used with Octane, "move_to_start" and "move_to_end" cannot function correctly, but it works properly when started using "php artisan serve.

The second issue is that when dragging to reorder, duplicate items appear at the bottom. This problem doesn't occur in Safari, but it does in Chrome.

g124578g avatar Nov 02 '23 08:11 g124578g

I've also experienced your first issue using Laravel Octane. It seems to somehow be related to the sortable cache.

Adding the public static $sortableCacheEnabled = false; to the resource fixed it for me.

LuckyLukas98 avatar Jan 23 '24 13:01 LuckyLukas98

This might be related to the static variable used for caching in the HasSortableRows Trait.

Using Octane this variable will be initialized once, stored in RAM and used for subsequent request, which could explain why moving items to to start or to the end will result in the same order as before.

LuckyLukas98 avatar Jan 23 '24 13:01 LuckyLukas98