-
-
Notifications
You must be signed in to change notification settings - Fork 344
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: Lazy loaded table with HTML placeholder results in browser console warnings and errors #2155
Comments
Are you injecting the assets, or bundling them? |
config/livewire-tables.php /**
* Cache Rappasoft Frontend Assets
*/
'cache_assets' => false,
/**
* Enable or Disable automatic injection of core assets
*/
'inject_core_assets_enabled' => false,
/**
* Enable or Disable automatic injection of third-party assets
*/
'inject_third_party_assets_enabled' => false,
/**
* Enable Blade Directives (Not required if automatically injecting or using bundler approaches)
*/
'enable_blade_directives' => false, resources/js/app.js import './bootstrap';
import { Livewire, Alpine } from '../../vendor/livewire/livewire/dist/livewire.esm';
import Clipboard from '@ryangjchandler/alpine-clipboard'
import '../../vendor/rappasoft/laravel-livewire-tables/resources/imports/laravel-livewire-tables-all.js';
import 'livewire-sortable'
import mask from '@alpinejs/mask'
import flatpickr from "flatpickr";
import { Czech } from "flatpickr/dist/l10n/cs.js"
flatpickr.localize(Czech);
Alpine.plugin(mask)
Alpine.plugin(Clipboard)
Livewire.start() tailwind.config.js import defaultTheme from 'tailwindcss/defaultTheme';
/** @type {import('tailwindcss').Config} */
export default {
darkMode: ['class', '[data-theme="dark"]'],
content: [
'./vendor/laravel/framework/src/Illuminate/Pagination/resources/views/*.blade.php',
'./vendor/rappasoft/laravel-livewire-tables/resources/views/*.blade.php',
'./vendor/rappasoft/laravel-livewire-tables/resources/views/**/*.blade.php',
'./app/Livewire/*.php',
'./app/Livewire/**/*.php',
'./storage/framework/views/*.php',
'./resources/views/**/*.blade.php',
"./vendor/robsontenorio/mary/src/View/Components/**/*.php"
],
theme: {
extend: {
fontFamily: {
sans: ['Figtree', ...defaultTheme.fontFamily.sans],
},
},
},
plugins: [
require("daisyui"),
require('@tailwindcss/forms'),
require('@tailwindcss/typography'),
],
daisyui: {
themes: ["light", "dark", "coffee", "cupcake"],
},
}; resources/views/layouts/app-blade.php <!DOCTYPE html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="csrf-token" content="{{ csrf_token() }}">
<title>{{ config('app.name', 'Laravel') }}</title>
<!-- Fonts -->
<link rel="preconnect" href="https://fonts.bunny.net">
<link href="https://fonts.bunny.net/css?family=figtree:400,500,600&display=swap" rel="stylesheet" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.1.1/css/all.min.css" />
<!-- Scripts -->
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/chart.umd.min.js"></script>
@livewireStyles
@vite(['resources/css/app.css', 'resources/js/app.js'])
<style>
[x-cloak] {
display: none !important;
}
</style>
</head>
<body class="font-sans antialiased">
@include('layouts.navigation')
<x-main-mst with-nav full-width>
@include('layouts.sidebar')
<x-slot:content>
{{ $slot }}
</x-slot:content>
</x-main-mst>
<x-mary-toast />
@livewireScriptConfig
</body> |
Thanks for the above, I will look at this issue this weekend |
So I've got a fix for this, I just need to do some additional testing. |
Hi @lrljoe by the time you come up with a fix, could you atleast guide us on how can we fix it ourselves? |
I'm currently reviewing the livewire core placeholder behaviour to validate whether my theory is correct or not as to why it's doing this, as I may need to put a fix into Livewire itself. I fully intend however to do a release this weekend that has an interim fix at least, along with a load of other tweaks. It'll come out on Sunday. |
What happened?
Having a placeholder HTML produces the same issue as in #1990.
How to reproduce the bug
Add livewire HTML placeholder to lazy loaded table:
This results in the same exact errors in console after table is fully loaded.
Package Version
3.5.10
PHP Version
8.3.x
Laravel Version
11.37.0
Alpine Version
3.14.8
Theme
Tailwind 3.x
Notes
My project is using Livewire v3.5.18 and Tailwind 3.4.17
Error Message
Uncaught ReferenceError: currentlyReorderingStatus is not defined
The text was updated successfully, but these errors were encountered: