Closed ydeshayes closed 5 years ago
Hi Yann,
For your information, I started the merge of your branch in the master. The next week, i upgrade UDT in NGL and start the tests with real cases.
Best Regards, Guillaume
Hi Yann,
I begin the tests and we have a problem on pagination. The pagination toolbar is never refresh after change de number of result and when i click on a page number the page not change.
You can see the bug on demo page.
Regards, Guillaume
In your code, you convert allResult in displayResult and then you search.
var _allResult = angular.copy(that.allResult);
_displayResult = _allResult.map(function(data, index){
var line = {
edit: undefined,
selected: undefined,
trClass: undefined,
group: false,
new: false,
allResultIndex: index
};
return {
data: data,
line: line
};
});
if(that.config.filter.active === true){
_displayResult = $filter('filter')(_displayResult, searchTerms, false);
}
The better way is search before convert to limit de loop on result.
Hi !
I can't reproduce:
The pagination toolbar is never refresh after change de number of result and when i click on a page number the page not change.
You can see the bug on demo page.
For me https://github.com/institut-de-genomique/Ultimate-DataTable/commit/855485cb8865e4aa9b132d935ce674bfd1ec4a7a already resolve this bug, can't you check that you have all the commits and that your local branch is up to date with this PR when you test it ?
The new commit on the computeDisplayResult function do the search before convert to limit de loop on result.
thanks !
Hi Yann,
I retry and the pagination toolbar is not refresh after change the number of result by page.
See below my scenario : 1/ Load simple.html from your branch 2/ change number of result page 10 to 100
In this configuration the pagination toolbar must disappear because they are 66 results nad it's not the case. See print screen below.
The remove not remove the good line after a local search because the allResultIndex is compute after filter. May be it's not possible to avoid a loop on all result to have a the good allResultIndex.
Best regards, Guillaume
I've removed the commit about the optimisation to avoid the loop.
Please test if the last commit fix the pagination toolbar :)
Hi Yann,
The pagination works correctly. I need to test the loop on NGL because we have some page with 50000 results and i am afraid that slow.
Regards, Guillaume
How about this PR ? :)
Hi Yann,
I try to find time to test your modifications but UDT in NGL as diverge from your version and my first step is to merge the two versions together and after i can test your upgrade. Sorry for the delay.
Best regards, Guillaume
Hi,
A new local search mode is available, see documentation. #localSearch
Enjoy Yann ;-)
https://github.com/institut-de-genomique/Ultimate-DataTable/issues/3 The idea is to integrate the searchLocal process in the computeDisplayResult function.
All actions like typing search terms, hit enter etc... call the computeDisplayResult function.
In order to fix the bad line index editing when we edit a line in a filtered result, I add the allResultIndex as property in a line (displayResult.line). With this var, we can now link a displayResult line with a allResult index. That's for me a better consistant approach for futur improvement.
This new allResultIndex property is used in the saveLocal function:
In the remove function:
For now this system don't (should not) affect the group mode (filter work on not grouped line).
I've done some tests in local mode but I can't test in remote mode.
Give me your feedback in 'real life mode' !
EDIT: I've just notice a bug with the pagination I will fix it later