Closed fsrtechnologies closed 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:
@vincjo/datatables
@vincjo/datatables/server
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.
It helps a lot to have feedback Thx for your response 🙏
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.