diff --git a/resources/views/components/includes/loading.blade.php b/resources/views/components/includes/loading.blade.php index c07d9cb19..f22096321 100644 --- a/resources/views/components/includes/loading.blade.php +++ b/resources/views/components/includes/loading.blade.php @@ -9,15 +9,15 @@ @include($this->getLoadingPlaceHolderBlade(), ['colCount' => $colCount]) @else - merge($customAttributes['loader-wrapper']) - ->class(['w-full text-center h-screen place-items-center align-middle' => $isTailwind && ($customAttributes['loader-wrapper']['default'] ?? true)]) - ->class(['w-100 text-center h-100 align-items-center' => $isBootstrap && ($customAttributes['loader-wrapper']['default'] ?? true)]); + ->class(['hidden w-full text-center h-screen place-items-center align-middle' => $isTailwind && ($customAttributes['loader-wrapper']['default'] ?? true)]) + ->class(['d-none w-100 text-center h-100 align-items-center' => $isBootstrap && ($customAttributes['loader-wrapper']['default'] ?? true)]); }} wire:loading.class.remove="hidden d-none" > - +
hasDisplayLoadingPlaceholder()) - wire:loading.remove + wire:loading.class.add="hidden d-none" @else - wire:loading.class.delay="opacity-50 dark:bg-gray-900 dark:opacity-60" + wire:loading.class.delay="opacity-50 dark:bg-gray-900 dark:opacity-60" @endif id="{{ $tableName }}-row-{{ $row->{$primaryKey} }}" :draggable="currentlyReorderingStatus" diff --git a/tests/Traits/Visuals/LoadingPlaceholderVisualsTest.php b/tests/Traits/Visuals/LoadingPlaceholderVisualsTest.php index 0f64aa5bf..5d93e3432 100644 --- a/tests/Traits/Visuals/LoadingPlaceholderVisualsTest.php +++ b/tests/Traits/Visuals/LoadingPlaceholderVisualsTest.php @@ -12,7 +12,7 @@ public function test_can_see_placeholder_section(): void { Livewire::test(PetsTableLoadingPlaceholder::class) ->call('setPerPageAccepted', [1, 5, 10]) - ->assertSeeHtml('tr wire:key="table-loader" class="hidden d-none"') + ->assertSeeHtml('tr wire:key="table-loader') ->call('setPerPage', 5); } @@ -21,7 +21,7 @@ public function test_can_see_placeholder_custom_text(): void Livewire::test(PetsTableLoadingPlaceholder::class) ->call('setPerPageAccepted', [1, 5, 10]) ->assertSeeHtmlInOrder([ - '