Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IgxGridState is not working with IgxHierarchicalGrid #7025

Closed
bmtheo opened this issue Mar 31, 2020 · 4 comments · Fixed by #7592
Closed

IgxGridState is not working with IgxHierarchicalGrid #7025

bmtheo opened this issue Mar 31, 2020 · 4 comments · Fixed by #7592
Assignees
Labels
grid: hierarchical-grid grid: state-persistence 🧰 feature-request version: 10.1.x ✅ status: resolved Applies to issues that have pending PRs resolving them, or PRs that have already merged.

Comments

@bmtheo
Copy link

bmtheo commented Mar 31, 2020

Description

When using the IgxGridState directive with IgxHierarchicalGrid it is throwing an error when trying to getState
"ERROR TypeError: Cannot read property 'columns' of null"

  • igniteui-angular version:
    "igniteui-angular": "^9.0.6",
  • browser:
    Tested on Chrome (Version 80.0.3987.149), Firefox (73.0.1) & Edge (Version 80.0.361.69)

Steps to reproduce

https://stackblitz.com/edit/igx-hierarchical-grid-persistence

  1. Move a column around
  2. Click on Save
  3. The error is printed in the console and the state is not saved

Result

Error is printed and state is not usable

Expected result

No error then we can save/restore the state

Attachments

https://stackblitz.com/edit/igx-hierarchical-grid-persistence

Error in Chrome :
image

Error in Firefox :
image

The error in Stackblitz is not printed correctly, please consider reproducing in local to have the full error

Explanation of error

The error occurs in igniteui-angular-js line 59584 in function "getColumns()" (I don't have sourcemap) because this.grid is null.
I think this.grid is null because I'm using IgxHierarchicalGrid and not IgxGrid but I didn't find anything else to use in the doc/code (for example I looked for a IgxHierarchicalGridStateDirective)

I labeled this as a bug because the spec (https://github.com/IgniteUI/igniteui-angular/wiki/Grid-State-Persistence) specifies that it should work with all grids

If I'm mistaken and I just used the wrong directive, please show me the one to use and consider updating the doc

@bmtheo bmtheo added the 🐛 bug Any issue that describes a bug label Mar 31, 2020
@ChronosSF
Copy link
Member

ChronosSF commented Apr 1, 2020

@bmtheo , the IgxGridState directive was only implemented for state persistence of the igxGrid component, not for the Hierarchical or Tree grids. This should be considered a feature request.

@zdrawku
Copy link
Contributor

zdrawku commented Apr 3, 2020

Specification is updated

@radomirchev
Copy link
Contributor

@bmtheo the development of the feature request is starting form the current sprint.

@hanastasov hanastasov added the 🛠️ status: in-development Issues and PRs with active development on them label Apr 22, 2020
hanastasov added a commit that referenced this issue Apr 27, 2020
hanastasov added a commit that referenced this issue Apr 27, 2020
@radomirchev
Copy link
Contributor

@bmtheo , the feature request is in the list for the current milestone. You could follow the milestone progress on the Roadmap board or in the Roadmap file

hanastasov added a commit that referenced this issue Jun 25, 2020
hanastasov added a commit that referenced this issue Jun 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment