- Home
- Forum
- React - EJ 2
- Persist horizontal scroll position after filtering
Persist horizontal scroll position after filtering
Hi,
I use a grid with more colums than browser width resulting in a horizonal scroll bar (which is fine).
Now when I scroll to the right and filter data, the horizontal scroll position moves back to the left. In this case the user has to scroll back.
I want to persist (or restore) the horizontal scroll position after filtering.
I have tried this, which didn't work:
<GridComponent
dataSource={this.state.data} width="100%" height="100%"
ref={grid => this.grid = grid}
actionBegin={(args) => this.gridActionBegin(args)}
actionComplete={(args) => this.gridActionEnd(args)}
.../>
gridActionBegin(args) {
if (args.requestType === "filtering") {
this.scrollLeft = this.grid.getContentTable().parentElement.scrollLeft;
}
}
gridActionEnd(args) {
if (args.requestType === "filtering") {
this.grid.getContentTable().parentElement.scrollLeft = this.scrollLeft;
}
}
Restoring scrollLeft doesn't work, but the saved value seems to be ok. Now, how can I restore the scroll position so the user hasn't to scroll back?
SIGN IN To post a reply.
5 Replies
DR
Dhivya Rajendran
Syncfusion Team
January 29, 2020 01:46 PM UTC
Hi JP,
Thanks for contacting Syncfusion support.
Query : Now when I scroll to the right and filter data, the horizontal scroll position moves back to the left. I want to persist (or restore) the horizontal scroll position after filtering.
We are able to reproduce the reported issue at our end. We have confirmed and logged defect report for the same “Scrolling position is not persisted when filtering the records ( Menu and excel filter type )”. At Syncfusion, we are committed to fixing all validated defects (subject to technological feasibility and Product Development Life Cycle ) and including the defect fix in our next patch release which is expected to be rolled out on or before 12th February, 2020.
You can now track the current status of your request, review the proposed resolution timeline, and contact us for any further inquiries through this link.
Until then we appreciate your patience.
Regards,
R.Dhivya
R.Dhivya
JP
JP
February 12, 2020 12:01 PM UTC
Hi,
I just tried version 17.4.49 which was released yesterday, but the scrollbar still jumps back to left. Is this fix not included in this release? Or do I have to change something on my end to make this work?
Also, I am not authorized to open this link to the bug you provided.
Regards
BS
Balaji Sekar
Syncfusion Team
February 13, 2020 07:13 AM UTC
Hi Jan Ahnen,
Sorry for the inconvenience caused,
We have some complexities to fix the issue and with more cases, we need to make sure. As we are going to include this fix in our next patch release on 19 February 2020
Until then we appreciate your patience.
Regards,
Balaji Sekar.
DA
Damodhar
October 26, 2022 03:21 AM UTC
Hi,
I just tried the latest version. but the scrollbar still jumps back to left. Is this fix not included in this release? Or do I have to change something on my end to make this work?
JC
Joseph Christ Nithin Issack
Syncfusion Team
October 27, 2022 05:30 PM UTC
Hi Damodhar,
Thanks for your update.
We have prepared a sample and tried to reproduce the issue from our side, but we were not able to reproduce the issue from our side. We have attached the sample and video demo for your reference.
Sample: https://stackblitz.com/edit/react-am4ek6?file=index.js
Video: https://www.syncfusion.com/downloads/support/directtrac/general/ze/SCROLL~1-970959994
Please try to reproduce the issue in the sample provided or share a issue reproducible sample.
Please get back to us for further details.
Regards,
Joseph I.
SIGN IN To post a reply.
- 5 Replies
- 5 Participants
-
JP JP
- Jan 28, 2020 06:59 AM UTC
- Oct 27, 2022 05:30 PM UTC