vincjo / datatables

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

2.0.5 package is... broken? #144

Closed fsrtechnologies closed 4 days ago

fsrtechnologies commented 1 week ago

I haven't investigated every detail, but at the very least: The 2.0.5 npm package contains an older version of /dist/src/shared/index.js, which only has the first ten lines and does NOT export TableHandlerInterface; as a result, Datatable throws "TypeError: Cannot read properties of undefined (reading 'on')".

For the moment, I'm manually updating the files from the repository.

vincjo commented 4 days ago

If you need this type, preferably use TableHandler instead, from @vincjo/datatables or (if server-side pagination) from @vincjo/datatables/server. TableHandlerInterface is used in lib components at the moment, I'm not sure it is useful for any other purpose. Even if /shared directory is exported in the npm package, you don't need it in your code base. There only 2 possible imports:

fsrtechnologies commented 4 days ago

I wasn't trying to use TableHandlerInterface directly; I was updating my existing (v1) code to mirror your "Hello World" example - but I must have screwed something up, because I just now created a new route by simply copy/pasting your Hello World, and it works fine. I don't know what my mistake was; my apologies.

vincjo commented 4 days ago

It helps a lot to have feedback Thx for your response 🙏