how to add table tr using ajax_command in drupal 7
The HTML wrapper you will be replacing sounds like it includes the whole table, so when you return the markup for the new table row, it will replace all the content in that selector/wrapper. You need to include the markup for your whole table including the newly added row, not just the new row.