mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-21 10:47:04 +02:00
fix: reset count on change
This commit is contained in:
1 parent
610b59f4c6
commit
a7ee51526a
1 file changed
+2
@@ -24,6 +24,8 @@ export function IncrementalLoader<Props extends { key: string }>({
|
||||
const [count, setCount] = useState(initial);
|
||||
const sliced = data.slice(0, count);
|
||||
|
||||
useEffect(() => setCount(initial), [data, initial]);
|
||||
|
||||
return (
|
||||
<>
|
||||
{!skeleton &&
|
||||
|
||||
Reference in new issue
Block a user