Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

followOutput support for GroupedVirtuoso #191

Closed
osadchiynikita opened this issue Nov 9, 2020 · 7 comments
Closed

followOutput support for GroupedVirtuoso #191

osadchiynikita opened this issue Nov 9, 2020 · 7 comments
Labels
enhancement New feature or request

Comments

@osadchiynikita
Copy link

Hello @petyosi, first of all, thanks a lot for such helpful library, I was able to build solution I need with grouping and backwards scrolling direction.

followOutput works great for Virtuoso plain list component, but it's not supported for GroupedVirtuoso

How complex is to add support for grouped and is it in near future plans? I

Thanks!

@petyosi
Copy link
Owner

petyosi commented Nov 9, 2020

Hey,

That should be a trivial fix I think. I am working on a new release which improves the compatibility of the grouped and the regular component, so I will check how it works there.

@petyosi petyosi added the enhancement New feature or request label Nov 9, 2020
@osadchiynikita
Copy link
Author

@petyosi thank you! Feel free to ping me if testing or any else from my side needed

@petyosi
Copy link
Owner

petyosi commented Nov 10, 2020

@osadchiynikita I published an alpha version - v0.21.0-alpha.1. This is a test case I did. Notice that in addition to true, the followOutput now accepts "smooth" for a better UX. Interested in your feedback on that.

@osadchiynikita
Copy link
Author

osadchiynikita commented Nov 12, 2020

@petyosi Thank you for the very fast solution! On example I see it works exactly as expected. But in my app code I'm getting different TS compile errors. One is strange - Uncaught TypeError: subscription is not a function

Currently trying to debug and adapt my set up. Will provide more info once investigate

Here is the example of what props I'm using:

    <ListComponent
      ref={listRef}
      className={className}
      followOutput={'smooth'}
      item={(index: number) => renderItem(items[index], index)}
      startReached={isBackwards ? loadMore : undefined}
      endReached={isBackwards ? undefined : loadMore}
      computeItemKey={computeItemKey}
      initialTopMostItemIndex={getTopMostItemIndex()}
      rangeChanged={rangeChanged}
      groupCounts={groupCounts}
      group={group}
    />

@petyosi
Copy link
Owner

petyosi commented Nov 12, 2020

@osadchiynikita - Thank you very much; please reproduce that, I will take a look!

@petyosi
Copy link
Owner

petyosi commented Nov 12, 2020

nevermind, I got it. Undefined is not accepted as endReached. Will fix that, in the meantime you can work around it.

@petyosi
Copy link
Owner

petyosi commented Nov 26, 2020

Fixed in v1 beta.3 (along with endReached accepting undefined), check #203 for instructions.

@petyosi petyosi closed this as completed Nov 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants