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

Since that the treeView module uses treeBase module, saveState module is broken

Open jibap opened this issue 10 years ago • 10 comments

Hi,

I wanted to implement treeView on my grid, and i wanted to restore tree state after refreshing data.

In the saveState module, in saveTreeView and restoreTreeView functions, there is this condition : if ( !grid.api.treeView || !grid.options.saveTreeView ){ return {}; }

It seems obsolete since the treeView module uses treeBase module , isn't it ? If i remove the condition, of course i get this error log : TypeError: Cannot read property 'getTreeView' of undefined

I missed something or i'm true ?

jibap avatar Nov 20 '15 13:11 jibap

I think you're correct, and I think treeBase.getTreeState and treeBase.setTreeState are probably the calls that are needed.

PaulL1 avatar Nov 20 '15 22:11 PaulL1

I believe this bug is also inherited by ui.grid.expandable which fails to save and restore state. You might want to look into that as well when working on this.

KurtMar avatar Nov 26 '15 20:11 KurtMar

Expandable does not share from treeBase. I don't believe expandable has been updated to work with save/restore.

Sent from my iPhone

On 27 Nov 2015, at 6:43 AM, Kurt <[email protected]mailto:[email protected]> wrote:

I believe this bug is also inherited by ui.grid.expandable which fails to save and restore state. You might want to look into that as well when working on this.

Reply to this email directly or view it on GitHubhttps://github.com/angular-ui/ui-grid/issues/4742#issuecomment-159991687.

PaulL1 avatar Nov 26 '15 21:11 PaulL1

Is there any plan on the roadmap to get this working?

llamamoray avatar Jul 07 '16 15:07 llamamoray

++ Please, thanks!

RobbSadler avatar Sep 02 '16 17:09 RobbSadler

I have the same issue, Is there any update?

innai30 avatar Oct 26 '16 13:10 innai30

Any Updates on this?

RahulPol avatar Nov 21 '16 12:11 RahulPol

Facing the same issue, is there any update?

jawaharlalt avatar Feb 21 '17 05:02 jawaharlalt

Any update on this issue?

VipRepo avatar Oct 29 '17 15:10 VipRepo

Duplicate of #4145

prx-lmo avatar Sep 30 '21 13:09 prx-lmo