-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Handle tables with missing <thead> tag before attaching a DataTable
This commit fixes the following: - The sorting indicators from DataTable lib were missing (#79). In order to fix it, it was decided to add explicit classnames and wrap the table elements around custom classes due CSS specificity. After that, it was matter of adding CSS rules for the said classes that add unicode arrows. It takes advantage of the fact that DataTable lib changes the class name of the table header cell 'th', depending if data is sorted asc or desc - DataTables requires the `<table>` to have an explicit `<thead>`. Therefore, it was added a mechanism to find potential safe table headers, for instance, a `tr` full of `th` nodes. If its find, it makes the necessary changes to move the `<tr>` into a new `<thead>` element
- Loading branch information
Showing
2 changed files
with
161 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters