This repository has been archived by the owner on May 30, 2021. It is now read-only.
Fix: Columns rebuild row.cloneNode: TD's duplicated (TD²) #65
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
After few hours to solve mystery "doublons" and
sort don't work in my old Chomium browser ( chromium.31)
Test with other version Same result (2.0.0.a23, 1.6.10,) and ...
In v1.2.2 nothing TDs duplicated on init but atfer sorting yes ;)
Forward to Present ... And
After more tests & logs for find where TD is duplicated
In dataTable vanilla Columns.prototype.rebuild
Before // Loop over the rows and reorder the cells
dt.data are ok
but after each() : a & b clones TD is duplicated!
Only cloneNode(false) remove dublicated TDs
chrome: default param deep is false (maybe not)
Tested with true (TDs duplicated)
https://developer.mozilla.org/fr/docs/Web/API/Node/cloneNode
Rest of update code seems more speedy, with src file :)
##Info
Solve my problems callback modify td content in event : sort
dataTable.on('datatable.'+events
i use events init, refresh & sort
just an impression or lost important data?
cell -> c is maybe more logic for chain object?
It's just an intiuition, but if possible not (used in a test).
work fine with no doublons with original code
Why td create an element tr & then unused before each()?
probably oups :)
work fine with no doublons with original code
In One moment Chromium say : data is undefined
in Columns.prototype.sort
var content ... cell.data is undefined : Chromium 31
&& test with cell.innertext is undefined in Firefox 43
I have used this to solve the trouble
replaced by
[MDN textContent](https://developer.mozilla.org/en-
US/docs/Web/API/Node/textContent)
But,
with this update, now, all work fine in all levels, but why? :D
Tested ok with QUnit:
Firefox 43 & 59
Mozilla/5.0 (X11; Linux x86_64; rv:43.0) Gecko/20100101 Firefox/43.0
Mozilla/5.0 (X11; Linux x86_64; rv:59.0) Gecko/20100101 Firefox/59.0
Chromium 31 ;)
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko)
Chrome/31.0.1650.63 Safari/537.36