-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Open
Labels
documentationImprovements or additions to documentationImprovements or additions to documentation
Description
I have two tables, I swap regularly the tbody of the first one and OOB swap the whole second table.
After swap the inner html of the second table (with the new content) is included in the first table and the second table is not touched. Any additional swap will add the inner html of the second table again into the first table.
OOB swapping works normal if I use something else instead of second table.
Additional info (and I think here is the problem): the trigger for swap is inside the first table, more exactly in an input field in one header. I think your function makeFragment is not working correctly in this case.
Before swap:
<table id="myTable">
<thead> ...</thead>
<tbody> ...</tbody>
</table>
<table id="myOobTable">
<thead> ...</thead>
<tbody> ...</tbody>
</table>
After first swap:
<table id="myTable">
<thead> ...</thead>
<tbody> ...</tbody> // new content
<thead> ...</thead> // thead from myOobTable, new content
<tbody> ...</tbody> //tbody from myOobTable, new content
</table>
<table id="myOobTable"> // same as before swap
<thead> ...</thead>
<tbody> ...</tbody>
</table>
After second swap:
<table id="myTable">
<thead> ...</thead>
<tbody> ...</tbody> // new content
<thead> ...</thead> // thead from myOobTable, new content
<tbody> ...</tbody> //tbody from myOobTable, new content
<thead> ...</thead> // thead from myOobTable, content from first swap
<tbody> ...</tbody> //tbody from myOobTable, content from first swap
</table>
<table id="myOobTable"> // same as before swap
<thead> ...</thead>
<tbody> ...</tbody>
</table>
Metadata
Metadata
Assignees
Labels
documentationImprovements or additions to documentationImprovements or additions to documentation