Incorporated a simple table in angular 2 using angular material. I have two mat-tables where selected rows from the first table are transferred to the second table by clicking Move To Table 2, and vice versa when clicking Move To Table 1.
When selecting and Moving To Table 2, the row from the first table is spliced and transferred successfully. However, when I repeat the process for the second row, the previously transferred row reappears in my second table.
Below is my output:
Initially, transferring the first row removes it from the first table and moves it to the second table. https://i.sstatic.net/63gti.png
However, when transferring the second row, the previously moved row reappears in the second table. https://i.sstatic.net/no3R8.png