Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dependency Error: datatables.net-vue3@2.1.3 is not compatible with datatables.net@2.0.0 #29

Open
mrorabau opened this issue Feb 18, 2024 · 13 comments

Comments

@mrorabau
Copy link

datatables.net-vue3@2.1.3 (^2.1.3) is not compatible with datatables.net@2.0.0 (^2.0.0). Adding --legacy-peer-deps to npm seems to work, so it could perhaps just be a dependency limitation in the vue3 component.

@mrorabau
Copy link
Author

@mrorabau
Copy link
Author

See PR #30

@mrorabau mrorabau changed the title Dependency Error: datatables.net-vue3@2.1.3 is not compatible with datatabloes.net@2.0.0 Dependency Error: datatables.net-vue3@2.1.3 is not compatible with datatables.net@2.0.0 Feb 18, 2024
@AllanJard
Copy link
Contributor

Thanks - I'm not going to pull it in just yet, and I've made changes to the Vue component for DataTables which includes support for components in the table cells, but I'd like to make it more flexible than what it currently is. I've got this thread open with the Vue core to see if there are any options. With that resolved I'll be looking to get this release done.

@gy-jamesb
Copy link

I wanted to add a note that the PR #30 will fix but it was causing me frustrating issues. When I added the extension datatables.net-buttons-bs5 to my project I would get an error stating that Datatables.Buttons.default was undefined. In addition to this using the datatables.net-buttons extension worked but broke all the styles, including pagination. When I checked the version of against datatables.net-bs5 and datatables.net I noticed that npm install --save datatables.net-vue3 was pulling in version 1.13.11 for datatables.net and that was throwing off everything. I am sure if I added all these references manually like I have now this would not have been an issue, but the docs site just states run the one install. Again, this will be fixed once the PR is completed but I wanted to let others know if they have a ghost issue trying to use extensions.

@BayBreezy
Copy link

Hey @AllanJard , Is the component feature working as yet? If so, is there an example that I can follow?

Trying to use the vue docs but it's not rendering the button for me

@AllanJard
Copy link
Contributor

Yes - use the 3.x release of this package. Documentation for how to work with Vue components is available here.

@BayBreezy
Copy link

@AllanJard I did follow the docs.

It works only after passing the columns prop directly to the DataTable component.

If you pass the columns via the options object, the custom component is not displayed.

I am not sure if that can be fixed or it should just be added to the docs.

Thanks for your help ❤️.

P.S: the responsive & select are not in the Cinfig interface that is exported from datatables.net

@AllanJard
Copy link
Contributor

Can you create a test case showing the issue please?

P.S: the responsive & select are not in the Cinfig interface that is exported from datatables.net

No they aren't. They are added by datatables.net-responsive and datatables.net-select respectively.

@BayBreezy
Copy link

BayBreezy commented Mar 14, 2024

@AllanJard Here is the link: https://stackblitz.com/edit/nuxt-starter-7llxe7?file=pages%2Fnope.vue

If you loop at the nope.vue file, you see where the columns are passed in via the options object. When done like this, the component in the action slot is not rendered.

@AllanJard
Copy link
Contributor

I see what you mean. Thanks for the clarification.

Fix committed here.

@AllanJard AllanJard reopened this Mar 14, 2024
@BayBreezy
Copy link

TY!

Btw, this feature is only compatible with v2.x of datatables, correct?

@AllanJard
Copy link
Contributor

Yup, v2 only.

@BayBreezy
Copy link

@AllanJard Cool cool.

Looking forward to the release.
I managed to get it working in my UI Thing: https://ui-thing.behonbaker.com/components/datatable#custom-component

I have not studied the whole new layout thing just yet.. But I will get there

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants