This repository has been archived by the owner on May 30, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 78
implement paging and scrollY #57
Open
johanneswilm
wants to merge
26
commits into
Mobius1:master
Choose a base branch
from
johanneswilm:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Mobius1 One that that was not very clear to me was if it's always the case that |
@Mobius1 How do you want me to continue to work on this? |
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 ``` if (dt.hiddenColumns.indexOf(cell.cellIndex) < 0) { d = cell.cloneNode(true); d.data = cell.data; ``` Why td create an element tr & then unused before each()? probably oups :) work fine with no doublons with original code ``` var td, tr = createElement("tr"); ``` 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 ``` var content = cell.hasAttribute('data-content') ? cell.getAttribute ('data-content') : cell.data; ``` replaced by ``` var content = cell.hasAttribute('data-content') ? cell.getAttribute ('data-content') : cell.data || cell.textContent || cell.innerText;//CrossBrowser Fix ``` [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
in firefox, if the csv data has a "#" in it, the file ends at the index of the first occurrence. additionally, encodeURI doesn't encode "#" since it's a valid uri character.
@Mobius1 Ping! Are you still working on this or would it be better to simply fork and create a new package? I see there are now 5 PRs. |
…the pagination message changes.
…el/Vanilla-DataTables
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Hey,
there are still some things not entirely clear to me, and I don't know if this is how you would do it, but I tried to stick to your coding style as much as possible and did it in a similar way to how it's done in jQuery Datatables. I worked on the 1.6 rather than the 2.0 branch, give that it wasn't clear to me on which one you working.
Relates to #56 .