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

[Elements]: autoGenerate does not override columns declared in markup #14260

Open
RivaIvanova opened this issue May 23, 2024 · 0 comments
Open
Labels

Comments

@RivaIvanova
Copy link
Member

Description

When set to true, the autoGenerate property in igniteui-angular overrides all columns declared through code or in markup as stated in the API docs.
When used in WebComponents/React/Blazor the declared columns persist.

  • "igniteui-webcomponents-grids": "4.8.0",
  • "igniteui-react-grids": "18.6.0",
  • "IgniteUI.Blazor": "23.2.223"

Steps to reproduce

  1. Define a grid that has autoGenerate set to true.
  2. Define a column in the markup.
<igc-grid auto-generate="true" id="grid">
    <igc-column field="ID"></igc-column>
</igc-grid>
private data: any[] = [
    { ID: 1, Product: "Chai", Category: "Beverages" },
    { ID: 2, Product: "Chang", Category: "Food" },
    { ID: 3, Product: "Tofu", Category: "Food" }
];

constructor() {
    const grid = document.getElementById("grid") as IgcGridComponent;
    grid.data = this.data;
}

Result

Only the defined ID column is rendered.

Expected result

The columns should be generated based on the provided data, i.e., three columns (ID, Product, Category) should be rendered.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant