rappasoft / laravel-livewire-tables

A dynamic table component for Laravel Livewire
https://rappasoft.com/docs/laravel-livewire-tables/v2/introduction
MIT License
1.7k stars 320 forks source link

[Bug]: Uncaught ReferenceError: currentlyReorderingStatus is not defined #1640

Closed winkcler closed 3 months ago

winkcler commented 5 months ago

What happened?

I don't know why this problem happens every now and then.

When this happens, the table is completely disconfigured.

image

The search input disappears.

When I change the page, the button appears again, but the table is unconfigured.

image image

How to reproduce the bug

No response

Package Version

3.2.0

PHP Version

8.2.x

Laravel Version

10.8.0

Alpine Version

3.10.5

Theme

Bootstrap 5.x

Notes

No response

Error Message

livewire.js?id=e2b302e9:1202 Uncaught ReferenceError: currentlyReorderingStatus is not defined at [Alpine] !currentlyReorderingStatus (eval at safeAsyncFunction (livewire.js?id=e2b302e9:1249:21), :3:33) at livewire.js?id=e2b302e9:1271:23 at tryCatch (livewire.js?id=e2b302e9:1191:14) at livewire.js?id=e2b302e9:3534:19 at reactiveEffect (livewire.js?id=e2b302e9:2365:18) at Object.effect2 [as effect] (livewire.js?id=e2b302e9:2340:7) at effect (livewire.js?id=e2b302e9:734:35) at wrappedEffect (livewire.js?id=e2b302e9:750:29) at Function. (livewire.js?id=e2b302e9:3534:5) at flushHandlers (livewire.js?id=e2b302e9:1353:48)

CLCWebsiteServices commented 5 months ago

https://laraveldaily.com/post/livewire-3-laravel-breeze-error-alpine-js-conflict

jaroslavstefanec commented 5 months ago

Review your app.js file to ensure that Alpine.js is not initialized twice.

desinabl commented 5 months ago

https://laraveldaily.com/post/livewire-3-laravel-breeze-error-alpine-js-conflict

in addition to the solution given by CLCWebsiteServices, after you make sure that alpinejs is not being loaded twice and if you are using a bundler, such as vite for example I suggest you add the following to app.js:

import '../../vendor/rappasoft/laravel-livewire-tables/resources/imports/laravel-livewire-tables-all.js'; Reference: https://rappasoft.com/docs/laravel-livewire-tables/v3/start/including-assets.

stale[bot] commented 4 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.