pluto_grid icon indicating copy to clipboard operation
pluto_grid copied to clipboard

[Feature] Is it possible to make infinite scroll?

Open soft24 opened this issue 3 years ago • 1 comments

If possible, is there any sample code?

I mean something like this: https://flutter.syncfusion.com/#/datagrid/load-more-behavior/infinite-scrolling

soft24 avatar Sep 10 '22 06:09 soft24

@soft24 It currently does not offer infinite scrolling. You can implement it yourself, but I'll consider adding a feature. thank you.

bosskmk avatar Sep 12 '22 22:09 bosskmk

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] avatar Oct 13 '22 11:10 github-actions[bot]

If possible, is there any sample code?

I mean something like this: https://flutter.syncfusion.com/#/datagrid/load-more-behavior/infinite-scrolling

I have implemented infinite scrolling in one of my projects by inserting the rows accordingly. Here is my insertRows routine.

` void insertRows(int index, List items){ Site item; List<PlutoRow> newRows=[];

for (int i = 0; i < items.length; i++) {
  item = items[i];
  newRows.add(_createRow(item));
}

if (plutoGridStateManager!=null) plutoGridStateManager!.insertRows(index, newRows);

}`

SaltH2OFish avatar Oct 18 '22 19:10 SaltH2OFish

You can listen for an event when the end of the grid is reached as shown below.

stateManager.eventManager!.listener((PlutoGridEvent plutoEvent) {
  if (plutoEvent is PlutoGridCannotMoveCurrentCellEvent && plutoEvent.direction.isDown) {
    // do something like insertRows or stateManager.setShowLoading.
  }
}

stateManager.scroll.bodyRowsVertical also references ScrollColtroller. With this you can add rows same as above when scrolling reaches the end.

Of course, there are plans to provide it simply as a function of PlutoGrid.

bosskmk avatar Oct 19 '22 04:10 bosskmk

Released PlutoGrid 5.3.0

Refer to below link. https://github.com/bosskmk/pluto_grid/issues/601

bosskmk avatar Oct 22 '22 06:10 bosskmk

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] avatar Nov 21 '22 11:11 github-actions[bot]

This issue was closed because it has been inactive for 14 days since being marked as stale.

github-actions[bot] avatar Dec 06 '22 11:12 github-actions[bot]