Skip to content

Vue 2.7 #7

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

Closed
pm-consultancy opened this issue Jul 22, 2022 · 10 comments
Closed

Vue 2.7 #7

pm-consultancy opened this issue Jul 22, 2022 · 10 comments

Comments

@pm-consultancy
Copy link

Please make it compatible with vue 2.7 (no need for vue-demi)

@AMontagu
Copy link
Collaborator

AMontagu commented Jul 22, 2022

Hi Paul.
Thanks for the suggestion. I have reserved some time on monday for that.

@AMontagu
Copy link
Collaborator

Hello I have make it work with vue 2.7 on the next branche.

you can install it with npm i vue-datatable-url-sync@next

There is one side effect about vue router wich doesn't actually support the useRouter and useRoute but working on it:
vuejs/vue-router#3760
vuejs/vue-router#3763

You can find an example of how make it work here:
https://github.com/socotecio/vue-datatable-url-sync/blob/next/vue2.7-example/src/router/composable.js

Do not hesitate if you have any question and close your issue if its working as expected for you

@pm-consultancy
Copy link
Author

I was just able to check it. But it's not working
Your example is changing the data, but not the url in the browser

If updated the component in my project, it doesn't work at all. (no loading data from the API)

@pm-consultancy
Copy link
Author

I've narrowed down to the 'possible' culprit.

watch(options, () => {

Doesn't get fired at all. for some reason, it doesn't pick up on the changes on the options object

@pm-consultancy
Copy link
Author

The watcher on the Form object

isn't working either

@pm-consultancy
Copy link
Author

After some digging I found it
instead of using
import useDatatableUrlSync from 'vue-datatable-url-sync'
You should use
import useDatatableUrlSync from 'vue-datatable-url-sync/src/useDatatableUrlSync'

@AMontagu
Copy link
Collaborator

AMontagu commented Oct 7, 2022

Sorry for the late reply.
This should not be an issue. Actually using vue-datatable-url-sync/src/useDatatableUrlSync instead of vue-datatable-url-sync will use the typescript file directly instead of its transpiled version: dist/vue-datatable-url-sync.esm.js.

This is working in local for me. can't say much about that. I will retry it now just to be sure.

@AMontagu
Copy link
Collaborator

AMontagu commented Oct 7, 2022

Okay so you right. It is working in local when using directly the file but not the transpiled one that is used by default by npm.
Seem like there is an issue with webpack or vue 2.7. Will try to update it.

@AMontagu
Copy link
Collaborator

AMontagu commented Oct 7, 2022

@PaulMenheere So vue-demi is still required for building the library for both vue2 and vue3.
We just needed an update of vue-demi to make it work correctly with vue 2.7. I merged everything in master. So the version 2.0.1 shoul be available without the "next" tag.
Tell me if you face an issue and close the issue if it's working for you

@AMontagu
Copy link
Collaborator

@PaulMenheere I am closing this. Do not hesitate to reopen it if needed

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

2 participants