What is the best way to replace an existing form or datatable in a page with a new one?
The new form/datatable will have different structure when compared to the existing.
e.g. There will be several tabs in a page. Each tab will have to display a different datatable.
I can confirm the issue with your original samples.
UI replacing doesn’t work correctly when you are using it against top level UI ( UI that was attached directly to HTML container ). We will fix it in the next update.