Data grid / foldkit-mixins-data-grid

MoreOnScroll

function · packages/mixins-data-grid/src/moreOnScroll.ts:14

function MoreOnScroll<
  Input extends Pick<
    GridInput<never, string, never, Message>,
    'status' | 'onMore'
  >,
  Message,
>(
  view: SlotView.SlotView<typeof GridSlots, Input, Message>,
): SlotView.SlotView<typeof GridSlots, Input, Message>

Sends the grid's onMore as its More button comes within 200px of the grid's visible box, and again after each load while the button stays there; the button stays for the keyboard. Nothing is asked while the rows' source is busy. Attach it to a grid's view: DataGridView<Message>().define(Grid).pipe(MoreOnScroll).

In the guides