This PR proposes the introduction of a headerClass property in \Okipa\LaravelTable\Column that allows adding CSS classes to the main <th> elements.
Validating this PR
From a Column object, call its headerClass method passing any string representing a CSS class, example: Column::make('testProperty')->headerClass('my-custom-css-class')
Open the page the table's being rendered and inspect the table's head element
The testProperty column th element has an additional class and it's now like this: class="align-middle test-header-class"
The \Tests\Unit\Bootstrap5\TableColumnsTest::it_can_set_column_header_class() is updated and also serves as an example of its usage
Future considerations
If approved, this solution may also be implemented to add CSS classes to <td>'s.
This PR proposes the introduction of a
headerClass
property in\Okipa\LaravelTable\Column
that allows adding CSS classes to the main<th>
elements.Validating this PR
Column
object, call itsheaderClass
method passing any string representing a CSS class, example:Column::make('testProperty')->headerClass('my-custom-css-class')
testProperty
columnth
element has an additional class and it's now like this:class="align-middle test-header-class"
\Tests\Unit\Bootstrap5\TableColumnsTest::it_can_set_column_header_class()
is updated and also serves as an example of its usageFuture considerations
<td>
's.