Closed aleswita closed 7 years ago
what is without function? there is cycle asc -> desc -> null -> asc -> desc -> ...
If I use code bellow
$grid->addColumn("revision","Revize")->enableSort();
cycle is: null -> asc -> desc ....
if use code below
$grid->addColumn("revision","Revize")->enableSort($grid::ORDER_ASC);
cycle is: asc -> desc -> asc -> desc ....
and if use:
$grid->addColumn("revision","Revize")->enableSort($grid::ORDER_DESC);
cycle is: desc -> desc -> desc
Thanks for bugreport, I will look into it.
Hi, please.. is this behavior solved? Thanks a lot !
Just looked into it and it seems that there is something wrong when creating link to sort signal. This is probably side effect of another bug.
Let's have an example scenario:
This does not make sense to me. Column 2 should be sorted ASC everytime we change sorting to this column from some other column.
I will try to look into it in few days, I think that fixing this behaviour could also fix this bug.
Guys, are you able to do a pullrequest?
I'm not familiar with code enough to be able to fix it. I suppose that problem is that it's not distinguished between first rendering and rendering after users change of sorting. It's necessary to detect user change of ordering and suppress default ordering.
So, it's fixed!
Thanks. špica :)
If you have default sort in column by DESC, like below
data in grid table sorted are OK, but link for change sort from DESC to ASC is without function