I’m building a modern module that uses a grid in the admin part. (I use a Docker container as environment)
Can someone help me out as when I compile my index.js with “npm run build” it compiles the output, but doesn’t load in the gridextensions?!
I’m kind of newbie here as well as not a seasoned prestashop developer, so please bare with me 😉
My index.js for the gridextensions to be compiled with npm:
const { $ } = window
$(() => {
const grid = new window.prestashop.component.Grid(‘eventGrid’)
grid.addExtension(new window.prestashop.component.GridExtensions.SortingExtension());
grid.addExtension(new window.prestashop.component.GridExtensions.ReloadListActionExtension());
grid.addExtension(new window.prestashop.component.GridExtensions.LinkRowActionExtension());
grid.addExtension(new window.prestashop.component.GridExtensions.SubmitRowActionExtension());
grid.addExtension(new window.prestashop.component.GridExtensions.SubmitBulkExtension());
grid.addExtension(new window.prestashop.component.GridExtensions.SubmitGridExtension());
grid.addExtension(new window.prestashop.component.GridExtensions.PositionExtension());
grid.addExtension(new window.prestashop.component.GridExtensions.FiltersResetExtension());
grid.addExtension(new window.prestashop.component.GridExtensions.AsyncToggleColumnExtension());
grid.addExtension(new window.prestashop.component.GridExtensions.ColumnTogglingExtension());
grid.addExtension(new window.prestashop.component.GridExtensions.BulkActionCheckboxExtension());
grid.addExtension(new window.prestashop.component.GridExtensions.BulkActionDropdownExtension());
grid.addExtension(new window.prestashop.component.GridExtensions.BulkActionSubmitExtension());
grid.addExtension(new window.prestashop.component.GridExtensions.BulkActionResetExtension());
});