Skip to content

Add example for DataTables #284

@nderwin

Description

@nderwin

It would be great if there was an example of how to integrate DataTables with the bundler. So far, my attempts have not been successful.

Adding

        <dependency>
            <groupId>org.mvnpm</groupId>
            <artifactId>datatables.net</artifactId>
            <version>2.1.7</version>
            <scope>provided</scope>
        </dependency>

to the pom, then trying to create a new DataTable in my Qute template:

    <script type="text/javascript">
        let table = new DataTable('#myTable');
    </script>

gives me a console error that DataTable is not defined. I also have

quarkus.web-bundler.dependencies.auto-import=all

in my config, and it's generating a main.js file with this line in it

import "datatables.net";

so not sure why it's not working. By comparison, Bootstrap, HTMX work perfectly without any additional configuration.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions