Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions ui/library/src/utils/VisibleEntriesDetector.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
const DEFAULT_ROOT_MARGIN = '50px';
// This array is a range from 0.0001 to 1 range of threshold. It will help with detecting
// on scroll with a better % compare to a fix threshold but not firing too frequent that
// can hamper our performance.
const DEFAULT_THRESHOLD = [0.0001, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 0.99];
const DEFAULT_THRESHOLD = 0;

export type SetVisibleEntriesCallback<TEntry> = (visible: Map<TEntry, number>) => void;
export type onVisibleEntriesChangeCallback<TEntry> = (args: {
Expand Down