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

Add pinning to saveState

Open jonathanchris opened this issue 11 years ago • 5 comments

I think the saveState feature should be able to include pinning. This way the grid can restore your pinned columns. Currently the saveState doesn't remember you pinned columns, this feels like a missed opportunity.

jonathanchris avatar Mar 26 '15 19:03 jonathanchris

It can easily be added, it's very extensible, it's just that nobody has added it as yet. A PR would be welcomed.

PaulL1 avatar Mar 26 '15 19:03 PaulL1

Awesome, coming soon!

jonathanchris avatar Mar 26 '15 19:03 jonathanchris

I think the most elegant way to do this (after doing something similar on grouping) is for the pinning feature to offer a "get pinning state" and a "set pinning state", which save state then just calls. Much tidier than having saveState knowing about the pinning internals.

PaulL1 avatar Mar 28 '15 23:03 PaulL1

@PaulL1 Take a look and let me know if you have any suggestions/recommendations on this PR. I used the publicApi and created an event and method in the pinning feature. Then utilized this in the saveState feature. I attempted to add testing and documentation as I went along.

jonathanchris avatar Mar 30 '15 20:03 jonathanchris

This merged some time ago and seems to be working well.

PaulL1 avatar May 21 '15 01:05 PaulL1