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]: can not use cutom toolbar.blade.php #1607

Closed mrqaidi closed 6 months ago

mrqaidi commented 6 months ago

What happened?

custom toolbar.blade.php not applied all i am trying to do is change this line https://github.com/rappasoft/laravel-livewire-tables/blob/2bfe6df78d0e9d286b31176131a95b2041ba36cb/resources/views/components/tools/toolbar.blade.php#L46

screenshot

How to reproduce the bug

use custom toolbar.blade.php in resources/views/vendor/rappasoft/livewire-tables/components/tools/toolbar.blade.php

Package Version

3.1.5

PHP Version

8.2.x

Laravel Version

10

Alpine Version

3.4.2

Theme

Tailwind 3.x

Notes

No response

Error Message

No response

lrljoe commented 6 months ago

When you say it's not applied, once you update that file, did you clear out your view cache?

What did you try editing it from/to? Did you run your bundler/build to ensure any new classes are picked by up Tailwind?

CThomas87 commented 6 months ago

I'm having the same issue; the package doesn't seem to respect published views.

I published the views and edited line 9 in toolbar.blade.php (resources\views\vendor\rappasoft\livewire-tables\components\tools\toolbar.blade.php): 'd-md-flex justify-content-between mx-3 my-3' => $component->isBootstrap(),

Ran php artisan view:clear php artisan cache:clear

The views aren't updated and the div still has the class list: 'd-md-flex justify-content-between mb-3'

image

lrljoe commented 6 months ago

Right, issue with the publish path/view path. I'll get this fixed in the next version.

For now you could symlink resources/views/vendor/livewire-tables to resources/views/vendor/rappasoft/livewire-tables

Or just copy the folder to "resources/views/vendor/livewire-tables"

lrljoe commented 6 months ago

The fix that corrects the path that is published to is now in 3.1.7 - just released.

I do recommend that you avoid publishing the views wherever possible, as this can often lead to breaking changes.

If you do need to publish the views, then remove any non-modified views from your published copy.

If you find yourself needing to modify just some classes on a view, then please do raise a feature request, as we are trying to cover more of the areas that may need customising as we go. There are also some upcoming changes allowing you to more smoothly swap out specific blades.

mrqaidi commented 6 months ago

The fix that corrects the path that is published to is now in 3.1.7 - just released.

I do recommend that you avoid publishing the views wherever possible, as this can often lead to breaking changes.

If you do need to publish the views, then remove any non-modified views from your published copy.

If you find yourself needing to modify just some classes on a view, then please do raise a feature request, as we are trying to cover more of the areas that may need customising as we go. There are also some upcoming changes allowing you to more smoothly swap out specific blades.

issue fixed . Thank you