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

Datatable: Add reference to virtualScroller #3009

Closed
michael88 opened this issue Jun 27, 2022 · 2 comments · Fixed by #3011
Closed

Datatable: Add reference to virtualScroller #3009

michael88 opened this issue Jun 27, 2022 · 2 comments · Fixed by #3011
Assignees
Labels
Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add
Milestone

Comments

@michael88
Copy link

michael88 commented Jun 27, 2022

Describe the feature you would like to see added

Please provide the possibility to get from datatable a REF(erence) to the underlying virtualScroller Object/Module to call its exported methods

Is your feature request related to a problem?

I tried to position the datatable (with virtualscroller) to a specific Index.
I can see, that in the virtualscroller Module (virtualscroller.esm.js) there exists (exports) the function "scrollToIndex" .
But I can't get a reference to VirtualScroller to call this method/function.

Describe the solution you'd like

datatable should export a ref to Virtualscroller

@michael88 michael88 added the Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add label Jun 27, 2022
@melloware melloware changed the title datatable: Add reference to virtualScroller Datatable: Add reference to virtualScroller Jun 27, 2022
@melloware
Copy link
Member

I think all components using VirtualScroller need a way of getting the ref

melloware added a commit to melloware/primereact that referenced this issue Jun 29, 2022
@melloware melloware self-assigned this Jun 29, 2022
@melloware melloware added this to the 8.2.0 milestone Jun 29, 2022
@melloware
Copy link
Member

After this fix is merged you will be able to do to dtRef.current.virtualScrollerRef to get access to the virtual scroller ref

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants