vincjo / datatables

A toolkit for creating datatable components with Svelte
https://vincjo.fr/datatables
MIT License
474 stars 18 forks source link

Remote table data handler selectAll method missing params #125

Closed cezaryszymanski closed 2 months ago

cezaryszymanski commented 3 months ago

Hello

I tried using selectAll function of data handler just like in the documentation and select by id:

handler.selectAll({ selectBy: 'id' })

but it seems that in DataHandler from remote this method doesn't expects any parameters

Is this intended, if so by what are rows selected by in that case?

I tried to find some information about it in the documentation but I didn't find any, I would be very glad for any info about it

vincjo commented 3 months ago

Hello,

The documentation is seriously lacking in implementation examples. Unfortunately, the example with selection no longer works since the "beer API" it relied on is offline.

There is a selectBy parameters which is required, but at the DataHandler instaciation level.

const handler = new DataHandler(data, { selectBy: 'id' })

I try to improve progressively the documentation but i'm focused on the next major release which will have 100% coverage.