DataTable uses either setter-based checking or ngDoCheck to realize if the underlying data has changed to update the user interface (UI). This is configured using the immutable property. If you enabled (default) it, then the setter-based detection is utilized so your data changes such as adding or removing a record should always create a new array reference instead of manipulating an existing array. This constraint is due to Angular and does not trigger setters if the reference does not change. In this case, use slice instead of splice when removing an item or use the spread operator instead of the push method when adding an item.
On the other hand, setting the immutable property to false removes this restriction using ngDoCheck with IterableDiffers to listen to changes without the need to create a new reference of data. The setter-based method is faster; however, both methods can be used depending on your preference.