aslagle / reactive-table

A reactive table designed for Meteor
https://atmospherejs.com/aslagle/reactive-table
Other
328 stars 138 forks source link

Sorting by ID (integer) fails #460

Closed JensAttermeyer closed 7 years ago

JensAttermeyer commented 7 years ago

I have a problem with the sorting of my data... The table settings are:

tblStockOnHandSettings: function () { return { rowsPerPage: 20, showColumnToggles: true, showNavigation: "auto", filters: ["myFilterStockOnHand"], fields: [ { key: "products_id", label: TAPi18n.(500018)}, { key: "products_model", label: TAPi18n.__(500055) }, { key: "products_ean", label: TAPi18n.(500056) }, { key: "ean_packung", label: TAPi18n.__(500057) }, { key: "products_name", label: TAPi18n.__(500058) }, ....

The table data is stored in an array. The "products_id" is an integer value. The data in the table should be order by the products_id like : 1 2 3 . . 10 11 . .

But the order is like 1 10 11 12 .. . 2 21 22 and so on. So it seems the table component interprets the ID values as a string and not as integers. Is it possible to get the order of the ID's in a natural sequence?