Table scrolls to top after edit
Table scrolls to top after edit
I am using Scroller and Editor. and particular issue I have is with serverside:true
.
When I edit a row, using either inline or the traditional editor, the table redraws and places me back at the top, losing complete sight of the row that was just being worked on.
This is particularly annoying when doing inline editing where I might expect to change several cells on the same row.
This same issue was raised by this post back in July 2016:https://datatables.net/forums/discussion/36382, but there's no solution posted.
Any idea how to prevent the redraw or how to quickly bring the original row back into the scroll window?
This question has accepted answers - jump to:
Answers
Use the
drawType
option of theform-options
. Setting it tonone
will address that. I'll look into doing something about it out of the box.Allan
Thanks, @allan.
I was just reading about
drawType
last night in bed and thought I'd try it this morning.And yes -- I lay in bed at night and read about DataTables on my phone . . . so what?!? :-)
Anyway, I've tried both
none
andpage
but when I used those the inline editing won't work for the text fields, although oddly it will for the checkboxes. Actually if I try any of the fourdrawType
s I get the same behavior.Here's my complete code and I can send you some account access information if seeing the actual page would help:
Nope -- never mind, found the problem.
I hadn't put any of those in quotes!
OK, I'm good now.
Thanks, @allan.