minus icon indicating copy to clipboard operation
minus copied to clipboard

Feature Request: add support for an EOF callback

Open lfarrel6 opened this issue 1 year ago • 4 comments

Feature description

I'd like to use minus to display paginated data that is pulled from an API. Ideally, the data would be paginated as the user scrolls through the logs, in a similar manner to an infinite scroll component.

Proposed Solution

An additional config on the PagerState, similar to the exit callback vectors. The callback should be fired when the user reaches the end of the currently available data.

Alternative

There's no clear alternative — while minus supports streaming data in, there's no obvious way to fetch more data at the rate that the user is consuming.

I am happy to contribute the changes to include this in the library.

lfarrel6 avatar Aug 29 '22 14:08 lfarrel6

Thanks for filling the feature request.

Currently I am busy incorporating a native user input declaration system inside ninus so it might take a while for me to work on this. If you want to help, you're are very welcome to file a PR.

For any help, join our Matrix or Discord rooms. Thanks again.

AMythicDev avatar Aug 29 '22 14:08 AMythicDev

Happy to contribute 😄 I'll reference this issue in the PR

lfarrel6 avatar Aug 29 '22 14:08 lfarrel6

Hey I just wanted to ping you whether you are ready with your PR for this issue. I am planning for a small release so if your PR is ready I will include it in the the release.

AMythicDev avatar Sep 17 '22 05:09 AMythicDev

Sorry, haven't gotten around to wrapping up the PR. Will hopefully get to it in the next week!

lfarrel6 avatar Oct 19 '22 20:10 lfarrel6