Coder Social home page Coder Social logo

Comments (5)

mike-hogan avatar mike-hogan commented on June 3, 2024 1

Certainly, thanks. This is a total mess though, sorry

https://svelte.dev/repl/e02305d6ddf341f5ae011d031a11f579?version=3.44.1

from svelte-infinite-loading.

jonasgeiler avatar jonasgeiler commented on June 3, 2024 1

Sorry I couldn't respond yesterday, was busy.
Anyways:

Here is your fixed REPL: https://svelte.dev/repl/70aa77f9aff048bebedef20ad68e4eae?version=3.44.2

I think you main problem was using list.push(...) instead of having an assignment like list = [...list, newItem]. See here for more info.

Then, for some reason, putting the <InfinteLoading /> component inside a <tr> doesn't work. I've changed it to <div> and then it actually appeared. Probably an issue that could be solved with CSS - or just use a <div>.

Then, always add let:style {style} to the element with slot="item". This makes sure the items are rendered correctly.

There are some other improvements, like putting <tbody> outside the virtual list, and adding width: 100% to the .tall class. But these aren't completely essential.

Also, I'm aware that the documentation sucks a bit... But I'm too lazy to make it better and also moved on to some other projects 😅
Sometimes, tho, the documentation of the original Vue.js library might help: vue-infinite-loading.
Or the documentation of the original React.js library for the virtual list: react-tiny-virtual-list.

I hope that helps!

from svelte-infinite-loading.

mike-hogan avatar mike-hogan commented on June 3, 2024 1

Wow, this is unbelievable, thanks! Works like a charm

from svelte-infinite-loading.

jonasgeiler avatar jonasgeiler commented on June 3, 2024

Could you provide a Svelte REPL with your current implementation? Maybe I can try to get it working.

from svelte-infinite-loading.

jonasgeiler avatar jonasgeiler commented on June 3, 2024

Happy to help! 😊

from svelte-infinite-loading.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.