https://github.com/supertigerdev/solid-virtual-scroll
https://github.com/supertigerdev/solid-virtual-scroll
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/supertigerdev/solid-virtual-scroll
- Owner: SupertigerDev
- Created: 2022-06-05T11:44:36.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2022-06-05T18:44:53.000Z (about 4 years ago)
- Last Synced: 2023-05-05T21:31:58.343Z (about 3 years ago)
- Language: TypeScript
- Size: 13.7 KB
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Solid Virtual Scroll
Note: This library is not production ready yet!
## Usage
```tsx
handle(Item, height)
```
```tsx
import { createSignal } from "solid-js";
import { VirtualScroll } from "./VirtualScroll";
export default function App() {
const [items, setItems] = createSignal([]);
for (let i = 0; i < 10000; i++) {
setItems([...items(), i])
}
return (
{(item, handle) => {
if (item % 4 === 0) handle(() => , 23);
else handle(() => , 15);
}}
);
};
function Item(props: {i: number}) {
return
Item {props.i}
}
function Header() {
return
Header
}
```