Skip to content

Commit 86dad1b

Browse files
authored
Make data prop of <InfiniteScroll> required (#2642)
1 parent d4e1619 commit 86dad1b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/core/src/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -601,7 +601,7 @@ export interface InfiniteScrollRef {
601601
}
602602

603603
export interface InfiniteScrollComponentBaseProps {
604-
data?: string
604+
data: string
605605
buffer?: number
606606
as?: string
607607
manual?: boolean

packages/svelte/src/components/InfiniteScroll.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@
126126
127127
infiniteScrollInstance = useInfiniteScroll({
128128
// Data
129-
getPropName: () => data!,
129+
getPropName: () => data,
130130
inReverseMode: () => reverse ?? false,
131131
shouldFetchNext: () => !onlyPrevious,
132132
shouldFetchPrevious: () => !onlyNext,

0 commit comments

Comments
 (0)