I am having an issue in the 'Customer Support Dashboard' app where after updating data in a row of a table widget, the active row jumps back to the first row in the list. I searched for similar issues and found one on GitHub related to the Table widget's PrimaryKey and Sorting features. I tried turning off sorting and filtering but that didn't work, only adding a primary key fixed the issue. It turns out that providing a primary key is necessary for retaining the selected row and not a bug.
The issue where the active row jumps back to the first row in a table widget after updating data can be fixed by setting a Primary Key for the table. This is not a bug and is necessary for retaining the selected row after any action by the user, including sorting and filtering. Here is an example of setting the primary key "id" for a table:
// Set primary key for tabletableWidget.setPrimaryKeyColumns(["id"]);
Once the primary key is set, the selected row should be retained even after updating data or applying sorting to the table.