When an item is removed from a TableWidget (which is implemented as a DataTable), the total number of records shown below the table is not updated. One way to achieve an update of that number would be to reload the table contents after removal, just as it is reloaded after editing an item (and thereby, after adding one).
Possibly, though, there is a better way by making better use of the DataTables API. It should be investigated whether using the API correctly affects the total number of records displayed after removal (and addition) of an item, and whether items can be modified in a way that keeps sorting intact at all times. If that is possible, reloading table contents would not be necessary at all. Such a change might require a little refactoring as adding and removing items is implemented by the basic ListWidget and would now need to be specialised for the TableWidget.
thanks a lot for detailing the problem. Would you mind writing a test for that case? That would make it easier for us to reproduce the problem and find a solution.
When an item is removed from a TableWidget (which is implemented as a DataTable), the total number of records shown below the table is not updated. One way to achieve an update of that number would be to reload the table contents after removal, just as it is reloaded after editing an item (and thereby, after adding one).
Possibly, though, there is a better way by making better use of the DataTables API. It should be investigated whether using the API correctly affects the total number of records displayed after removal (and addition) of an item, and whether items can be modified in a way that keeps sorting intact at all times. If that is possible, reloading table contents would not be necessary at all. Such a change might require a little refactoring as adding and removing items is implemented by the basic ListWidget and would now need to be specialised for the TableWidget.