fiduswriter / simple-datatables

DataTables but in TypeScript transpiled to Vanilla JS
Other
1.31k stars 231 forks source link

[BUG] columns property not properly generated #378

Closed arcangelochine closed 2 months ago

arcangelochine commented 2 months ago

It appears that, given a filled table with an id, the simpleDatatables.DataTable constructor fails to properly initialize the columns property. In the following photos, it is evident that only the column with data-type="date" was properly translated. This leads to several problems because numbers get sorted alphabetically.

Screenshot 2024-04-12 alle 02 59 05

Given this table with id="prenotazioni", I executed from the console const dataTable = new simpleDatatables.DataTable("#prenotazioni");. This led to the following:

Screenshot 2024-04-12 alle 02 59 33

Then I checked dataTable in the console and observed that the columns array contains only the infos regarding the date column of the table.

Screenshot 2024-04-12 alle 03 00 10
johanneswilm commented 2 months ago

@arcangelochine You need to provide a full minimal example on jsfiddle or similar for me to be able to do anything about this.

johanneswilm commented 2 months ago

@arcangelochine Based on your screenshot, I believe you are using version 6.0.8 or even earlier. There have been three major versions released since then. I am working on this on a voluntary basis. Please make sure not to waste my time and update to the latest version before filing bugs.