EasyUI Forum

General Category => Bug Report => Topic started by: chandrasigniant on January 05, 2017, 03:57:50 PM



Title: TreeGrid:Shift select only works based on row ids, not after sorting
Post by: chandrasigniant on January 05, 2017, 03:57:50 PM
When I load the treegrid (configured to multiSelect=true and singleSelect=false) and do multiSelect using Shift Key it wokrs great.
But if I sort any of the columns, the Shift Key multi selection selects random rows instead of the rows between first selected row to the last selected row with shift key.
This bug is in version 1.5.1

Can you please fix it?


Title: Re: TreeGrid:Shift select only works based on row ids, not after sorting
Post by: jarry on January 05, 2017, 11:55:20 PM
The selected rows remain until you select another recordset. So after your sorting, all the rows have a new sorting order. The selected rows display in different order because you have sorted them.


Title: Re: TreeGrid:Shift select only works based on row ids, not after sorting
Post by: chandrasigniant on January 06, 2017, 07:26:46 AM
May be I did not explain it well.

This is not the case of selected rows before the sort remaining selected after the sort.
This is the case of going from 0 selections->sort the grid-> use shift key to multi select rows. Then the rows selected are not continuous.


Title: Re: TreeGrid:Shift select only works based on row ids, not after sorting
Post by: chandrasigniant on January 06, 2017, 09:16:59 AM
Here is the problem which was earlier posted by one of the other members
http://www.jeasyui.com/forum/index.php?topic=6223.0

I applied this patch and still I am seeing the same problem.



Title: Re: TreeGrid:Shift select only works based on row ids, not after sorting
Post by: jarry on January 06, 2017, 07:59:01 PM
Please try to download the patch from http://www.jeasyui.com/download/downloads/jquery-easyui-1.5.1-patch.zip.


Title: Re: TreeGrid:Shift select only works based on row ids, not after sorting
Post by: chandrasigniant on January 09, 2017, 12:12:35 PM
Thanks for the fix, but it has introduced some bug in the case of remoteLoading
It is resulting in JS error when I am expanding any nodes. it is a remote load using ajax call.
Here is the image containing the info about line of code having problem.
https://drive.google.com/open?id=0B0okAKC9EloCTWM0QUZnVkRjQVU (https://drive.google.com/open?id=0B0okAKC9EloCTWM0QUZnVkRjQVU)

The error in the console is as follows.
@ jquery-min.js:6
2017-01-09 13:57:41.406 jquery.easyui.min.js:formatted:15278Uncaught TypeError: Cannot read property 'length' of undefined
    at Object._98c (jquery.easyui.min.js:formatted:15278)
    at Object.render (jquery.easyui.min.js:formatted:15273)
    at _91f (jquery.easyui.min.js:formatted:14602)
    at jquery.easyui.min.js:formatted:14660
    at child.<anonymous> (Tree.js?version=@svn.revision@:43)
    at c (jquery-min.js:4)
    at Object.fireWith [as resolveWith] (jquery-min.js:4)
    at k (jquery-min.js:6)
    at XMLHttpRequest.r (jquery-min.js:6)


Title: Re: TreeGrid:Shift select only works based on row ids, not after sorting
Post by: chandrasigniant on January 09, 2017, 12:23:18 PM
After applying your patch, the sorting is broken. After expanding a node if I sort, all the children in the expanded node are removed from the parent node and are added as the siblings of the expanded node. May be the fix that you gave has broken the sorting as well.


Title: Re: TreeGrid:Shift select only works based on row ids, not after sorting
Post by: chandrasigniant on January 09, 2017, 05:21:06 PM
You know what, I think this bug I am talking about is introduced in your patch that you guys provided for this topic to me.

http://www.jeasyui.com/forum/index.php?topic=6425.0

Can you please fix it. It is a serious issue.


Title: Re: TreeGrid:Shift select only works based on row ids, not after sorting
Post by: jarry on January 09, 2017, 07:32:36 PM
This patch is only for version 1.5.1. Please download it from http://www.jeasyui.com/download/downloads/jquery-easyui-1.5.1-patch.zip.


Title: Re: TreeGrid:Shift select only works based on row ids, not after sorting
Post by: chandrasigniant on January 10, 2017, 01:17:18 PM
Thank you that fixed the problem. Do you forward port these fixes to the next version? Meaning if you release 1.5.2 , will you include this patch changes in that version?