I have several database tables and have a corresponding basic yii2 application that shows each table in a page. These tables have many columns, so each view contains a wide table. I therefore need horizontal scrolling, which I have enabled using CSS:
This works as intended. My problem is the following.
In the web interface, when I scroll to the right and sort by a column, the sorting works as expected, but the table is displayed such that the first few columns are visible on the page. That is, I have to scroll again to the right to view the column by which I sorted. I would like to prevent the table from moving horizontally when the table is reloaded after sorting i.e. I would like to keep the column by which I just sorted in place under my cursor. Could someone please say how could I achieve this?