Comments (5)
Certainly, thanks. This is a total mess though, sorry
https://svelte.dev/repl/e02305d6ddf341f5ae011d031a11f579?version=3.44.1
from svelte-infinite-loading.
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.
Wow, this is unbelievable, thanks! Works like a charm
from svelte-infinite-loading.
Could you provide a Svelte REPL with your current implementation? Maybe I can try to get it working.
from svelte-infinite-loading.
Happy to help! 😊
from svelte-infinite-loading.
Related Issues (13)
- Typescript types declaration HOT 2
- TypeError: Cannot read property 'offsetWidth' of null HOT 5
- window.remove vs window.removeEventListener in third argument detection. HOT 1
- Hide or edit the noMore message HOT 2
- Masonry - Is there a hook or callback I can use to re-fire masonry when new elements loaded? HOT 3
- [Help] How to use "identifier" ? HOT 2
- Enhancement request Horizontal Infinite loading. HOT 1
- doc: Improve documentation for the `infiniteHandler` HOT 3
- Is there any way to remove no more data message? HOT 2
- <InfiniteLoading> is not a valid SSR component. HOT 1
- Getting warning for this package after upgrading to sveltekit 2 HOT 1
- Enable CodeQL
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from svelte-infinite-loading.