ui-grid icon indicating copy to clipboard operation
ui-grid copied to clipboard

Column reordering does not work if pinning is enabled

Open somelinguist opened this issue 13 years ago • 10 comments

Column reordering does not work if enablePinning is set to true:

http://plnkr.co/edit/xbbp7e?p=preview

Also, even if enablePinning is set to false, if an individual column is marked as pinned, column reordering has bugs:

http://plnkr.co/edit/rjwola?p=preview

somelinguist avatar Mar 13 '13 21:03 somelinguist

this looks fixed in commit ac7ac57249211a8ebf3cb18b9fd9b0d0a91938a1

orneryd avatar Mar 18 '13 22:03 orneryd

http://plnkr.co/edit/rFqbxe?p=preview

orneryd avatar Mar 18 '13 22:03 orneryd

I tried your Plunker in both Firefox and Chrome and I'm still seeing both problems.

There's no reordering at all if enablePinning is set to true. Is this intentional?

If enablePinning is false but one of the columns has pinned=true, you can reorder most of the columns, but if you try to drag one over top of the column with pinned=true, the non-pinned column disappears, leaving a blank column to the right of the pinned one.

Of course, ideally, you would never have a column with pinned=true if enablePinning=false, but I can think of buggy situations where it might happen (having a pinned column and then disabling pinning).

Thanks for your help!

somelinguist avatar Mar 19 '13 00:03 somelinguist

yes, for now if a column is pinned you cannot move it until it is de-pinned.

what we should do is ensure that pinning is set to false if not enabled.

On Mon, Mar 18, 2013 at 5:20 PM, somelinguist [email protected]:

I tried your Plunker in both Firefox and Chrome and I'm still seeing both problems.

There's no reordering at all if enablePinning is set to true. Is this intentional?

If enablePinning is false but one of the columns has pinned=true, you can reorder most of the columns, but if you try to drag one over top of the column with pinned=true, the non-pinned column disappears, leaving a blank column to the right of the pinned one.

Of course, ideally, you would never have a column with pinned=true if enablePinning=false, but I can think of buggy situations where it might happen (having a pinned column and then disabling pinning).

Thanks for your help!

— Reply to this email directly or view it on GitHubhttps://github.com/angular-ui/ng-grid/issues/241#issuecomment-15090541 .

-Tim Sweet

orneryd avatar Mar 19 '13 00:03 orneryd

I just made it so the behavior cannot happen

https://github.com/angular-ui/ng-grid/commit/21bfb931ab6c646948d52a6e28b8cd1e01bfcdbd

On Mon, Mar 18, 2013 at 5:23 PM, Timothy Sweet [email protected] wrote:

yes, for now if a column is pinned you cannot move it until it is de-pinned.

what we should do is ensure that pinning is set to false if not enabled.

On Mon, Mar 18, 2013 at 5:20 PM, somelinguist [email protected]:

I tried your Plunker in both Firefox and Chrome and I'm still seeing both problems.

There's no reordering at all if enablePinning is set to true. Is this intentional?

If enablePinning is false but one of the columns has pinned=true, you can reorder most of the columns, but if you try to drag one over top of the column with pinned=true, the non-pinned column disappears, leaving a blank column to the right of the pinned one.

Of course, ideally, you would never have a column with pinned=true if enablePinning=false, but I can think of buggy situations where it might happen (having a pinned column and then disabling pinning).

Thanks for your help!

— Reply to this email directly or view it on GitHubhttps://github.com/angular-ui/ng-grid/issues/241#issuecomment-15090541 .

-Tim Sweet

-Tim Sweet

orneryd avatar Mar 19 '13 00:03 orneryd

Thanks for the clarification and the fix!

somelinguist avatar Mar 19 '13 00:03 somelinguist

This issue it back again, no longer works in latest. http://plnkr.co/edit/O2N1Ce?p=preview

AdamCraven avatar Apr 25 '13 11:04 AdamCraven

Confused why this is closed... column re-ordering doesn't appear to work at all with HEAD?

michaelpnash avatar Oct 24 '13 22:10 michaelpnash

You'd need to build the project. I haven't updated the ng-grid files in HEAD. I just merged the changes into the src files. I've been trying to get my head around when we were going to do a release.

roblarsen avatar Oct 25 '13 14:10 roblarsen

Rob:

Good stuff, thanks!

Mike

On Fri, Oct 25, 2013 at 8:43 AM, Rob Larsen [email protected]:

You'd need to build the project. I haven't updated the ng-grid files in HEAD. I just merged the changes into the src files. I've been trying to get my head around when we were going to do a release.

— Reply to this email directly or view it on GitHubhttps://github.com/angular-ui/ng-grid/issues/241#issuecomment-27097898 .

Michael Nash JGlobal Limited http://jglobal.com Software Craftsmanship Applied

michaelpnash avatar Oct 25 '13 14:10 michaelpnash