Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sandro hc respect caption #349

Closed
wants to merge 3 commits into from
Closed

Conversation

johanneswilm
Copy link
Member

No description provided.

SandroHc and others added 2 commits November 20, 2023 16:13
Preserves <tfoot> and <caption> tags from the original HTML table in the rendered datatable.

See the following example for a practical use case.

```html
<table id="example-table">
    <caption>List of smartphones.</caption>
    <thead>
        <tr>
            <th>Model</th>
            <th>Price</th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td>iPhone 14</td>
            <td>$699</td>
        </tr>
        <tr>
            <td>iPhone 15</td>
            <td>$799</td>
        </tr>
    </tbody>
    <tfoot style="font-weight: bold">
        <tr>
            <td>Total</td>
            <td>$1498</td>
        </tr>
    </tfoot>
</table>

<script>
    const dt = new DataTable("example-table", {
        // This also works:
        // caption: "List of smartphones."
    });
</script>
```
@johanneswilm
Copy link
Member Author

@SandroHc This is really good. Thanks! Unfortunately running npm test throws errors.

@SandroHc
Copy link
Contributor

Thanks for the quick reply! I have fixed the merge conflicts and the failing tests over at #348.

Feel free to close this PR, we can fix the conflicts in the other PRs and merge from there.

@johanneswilm johanneswilm deleted the SandroHc-respect-caption branch December 10, 2023 21:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants