Open mLicorn opened 1 week ago
Good spot! I'll look at getting this fixed for the next release.
So I've looked, and the reason behind this is that otherwise the button attributes get applied as it's sortable.
I'll look at adding in the methods to separate this a bit more cleanly!
So the fix for this will be in the next release, which adds in a "setLabelAttributes" for:
This helps to mitigate the issue where the "thAttributes" were being applied twice (once for the th, and once for the label itself).
The underlying reason for this is the clash between setThAttributes and setThSortButtonAttributes
Now there's a setLabelAttributes which applies to the label itself, Then the setThAttributes, and setThSortButtonAttributes apply to their respective elements only.
Expect the release by the end of the week, or feel free to test it out via the "development" branch
What happened?
When I modify the TH style via the
$thAttributesCallback
property, the style is also applied to the span in sort button.How to reproduce the bug
Modify TH padding via the setThAttributes method:
Package Version
3.4.20
PHP Version
None
Laravel Version
11.22.0
Alpine Version
3.14.1
Theme
Tailwind 3.x
Notes
The problem comes from the
resources/views/components/table/th.blade.php view
.$customAttributes
is used for both TH and SPAN in the button.Error Message
No response