vue-infinite-loading
vue-infinite-loading copied to clipboard
Vue 3 Compatibility
This patch enables compatibility with Vue 3. Aside from a couple deprecations that were fixed, I changed the build tool to rollup in stead of webpack.
Tests will likely need to be updated.
Thank you so much for this.
Thanks for your nice work! Maybe dev on full-clean branch then release a major version would be better?
And can this PR be released as an alpha version? Maybe the temp version that supported Vue.js 3.0 be helpful to users, we can release a version first, and then continue to improve it
@PeachScript when merge ? and can I use nuxt width used composition api ?
@PeachScript when merge ? and can I use nuxt width used composition api ?
After all test cases updated. But we can first release a alpha version if @nVitius confirm this PR can be released
@PeachScript Sorry for the late reply from me. If you make a new branch on the main repo (I called mine next
. I've seen that in a lot of other vue libs working on v3 support), I can change the PR to go there and we can merge in and make the alpha release. I'll also add a commit to update the package.json with a -beta
version so we can publish to npm.
@nVitius thanks for your reply ❤️ I've already create the next
branch, but I hope merge it after we completed code review & test cases paased, so I've published an pre-alpha version [email protected]
base on the PR branch, as the temporary way for Vue.js
3.0 projects.
@printscreen @productfrontenddeveloper it would be better if you could test it with your projects and feedback :D
@nVitius thanks for your reply ❤️ I've already create the
next
branch, but I hope merge it after we completed code review & test cases paased, so I've published an pre-alpha version[email protected]
base on the PR branch, as the temporary way forVue.js
3.0 projects.@printscreen @productfrontenddeveloper it would be better if you could test it with your projects and feedback :D
iam nuxt 2, vue 2 with nuxt compotion api. I can say that nuxt 3 will be out soon then. then i can try :D
Currently, the spinner setting for the alpha version is very wired. You have to assign it like the following:
<infinite-loading :identifier="identifier" @infinite="load" :spinner="2">
<template v-slot:no-more>no more</template>
<template v-slot:no-results>no results</template>
</infinite-loading>
It's using an index to represent various spinner listed in the doc.
A brief inspection into the codes in src shows that it is due to the processing of spinnerView
variable from the props.
@phantomlsh Thanks for the report! I just pushed a commit that should fix that issue.
Will you test it out when you have the chance? Until a new npm version is released, you can install it like this:
npm i --save 'github:nvitius/vue-infinite-loading#next'
@nVitius Thanks for your work but i tested with your fork and the issue reported by @phantomIsh persists
There is another bug with spinner. If you use custom tag with slot="spinner" or <template #spinner> it doesn't hide the spinner after loading. It does for default spinners, but not from custom. I had to hide it myself right after the $state.complete()
I forgot to re-run the build before committing. I pushed another commit with the updated dist files.
@noeGnh Could you provide a small reproduction for the custom spinner issue? We are using v-show
on the parent div of the spinner slot. I don't immediately see why it wouldn't work.
Hi @nVitius, here is a reproduction of the issue: https://codesandbox.io/s/vue-infinite-loading-issue-pi6cj
@noeGnh Thanks for setting that up.
I worked a bit on this over the weekend. It looks like Vue 3 has an issue where a v-bind:style
that is undefined will overwrite the style on the element and set it to empty. I've opened a PR on the Vue repo to try and address it. In the meantime, I've fixed it so that slotStyles compute to an empty object instead of undefined.
@nVitius Thanks for your work !
@PeachScript Can you publish the new build to npm?
I've had the opportunity to work extensively with the Composition API over the past 6 months or so. I want to take some time soon and refactor the components in here to use it, as well as update the tests and such so we can get this PR merged in.
Is there any update on this issue?
Any update on this?
Currently, the spinner setting for the alpha version is very wired. You have to assign it like the following:
<infinite-loading :identifier="identifier" @infinite="load" :spinner="2"> <template v-slot:no-more>no more</template> <template v-slot:no-results>no results</template> </infinite-loading>
It's using an index to represent various spinner listed in the doc.
A brief inspection into the codes in src shows that it is due to the processing of
spinnerView
variable from the props.
I cannot have empty(no value) in the slots. It is possible with the previous version.
@shashank261 Thanks for the report. I just pushed up a commit that should fix that issue. You can try it out by installing from my fork:
npm i --save 'github:nvitius/vue-infinite-loading#next'
Hi, can someone explain what has to happen for this to make it into the main release? We're waiting on this over on https://github.com/antoine92190/vue-advanced-chat
Thanks!
@PeachScript any progress ?
@nVitius thanks for your reply ❤️ I've already create the
next
branch, but I hope merge it after we completed code review & test cases paased, so I've published an pre-alpha version[email protected]
base on the PR branch, as the temporary way forVue.js
3.0 projects.@printscreen @productfrontenddeveloper it would be better if you could test it with your projects and feedback :D
@PeachScript We have been using 3.0.0-alpha.0-0
in production with no problem. Just following up from your previous comment.
npm i --save 'github:nvitius/vue-infinite-loading#next'
vue3 testted good working
node --version
v16.13.2
npm --version
8.1.2
Hangs on install during "reify:nan" in "reify:audit" after these lines
npm http fetch GET 200 https://registry.npmjs.org/vue-loader 246ms (cache hit)
npm timing metavuln:packument:vue-loader Completed in 255ms
npm timing metavuln:load:security-advisory:vue-loader:Pp1IW5wVzYexdOySlO/aAbqI2U/7il4gIjSOUDymIHC8cUtXeZL9vUdcRSFS5haoxlwjfhRs5hiV4iRUz1rJCg== Completed in 2ms
npm timing metavuln:calculate:security-advisory:vue-loader:Pp1IW5wVzYexdOySlO/aAbqI2U/7il4gIjSOUDymIHC8cUtXeZL9vUdcRSFS5haoxlwjfhRs5hiV4iRUz1rJCg== Completed in 257ms
npm timing metavuln:cache:get:security-advisory:listr-update-renderer:zOQB0PbNfy+2HdBM0HrEL+BwfaUzJTv9ZlpJZ9JwcOJoaxHQN021S+9kwPsfZq0g9Uo1y3UYYMrWP0QqWPB5hQ== Completed in 2ms
npm timing metavuln:load:security-advisory:listr-update-renderer:J06/DTp8oqjxiBqYUWpEItMGCNfkKxzmVHNyz719u956SNJBNE5sR3ZQug0yKGv6PDdcwyMyG5eV8oIV9wifzw== Completed in 0ms
npm timing metavuln:calculate:security-advisory:listr-update-renderer:J06/DTp8oqjxiBqYUWpEItMGCNfkKxzmVHNyz719u956SNJBNE5sR3ZQug0yKGv6PDdcwyMyG5eV8oIV9wifzw== Completed in 2ms
npm timing metavuln:cache:get:security-advisory:@graphql-codegen/cli:6RQfdYOpFrVbzP+x3+oJvOOUSeIkwVhgGpKW5eLzfyRpGhXaDnseLtaQstrjmNAjI6NG9QDqKh7yLxYKOGd7TQ== Completed in 5ms
npm timing metavuln:load:security-advisory:@graphql-codegen/cli:J06/DTp8oqjxiBqYUWpEItMGCNfkKxzmVHNyz719u956SNJBNE5sR3ZQug0yKGv6PDdcwyMyG5eV8oIV9wifzw== Completed in 216ms
npm timing metavuln:calculate:security-advisory:@graphql-codegen/cli:J06/DTp8oqjxiBqYUWpEItMGCNfkKxzmVHNyz719u956SNJBNE5sR3ZQug0yKGv6PDdcwyMyG5eV8oIV9wifzw== Completed in 222ms
npm timing auditReport:init Completed in 2586ms
npm timing reify:audit Completed in 3200ms
@PeachScript please pull merge.
Does not work if more than one InfiniteLoading component on the same page I think stateChanger is shared on ALL InfiniteLoading
When are you planning to make release for Vue.js 3 support?
@printscreen is this 3.0.0-alpha.0-0
version works with multiple