I would like to use DataTable. In this regard I have below JavaScript function.
(function () {
const getOrderInformationData = async (container) => {
const response = await mdcRequestData("/product/information-table/go2wire");
if (response && response.data.length > 0) {
container.innerHTML = mdcProcessData(response.data, "orderDataTemplate");
new DataTable("#order_information");
} else {
container.innerHTML = '<div class="alert alert-danger" role="alert">No product information was found.</div>';
}
};
const orderDataContainer = document.getElementById("order_information");
if (orderDataContainer) {
getOrderInformationData(orderDataContainer);
}
})();
But I am getting error Uncaught (in promise) ReferenceError: DataTable is not defined.
How to use DataTable without jQuery ?