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] If grid is in hidden container and widths are in % an error is thrown. #15154

Open
MayaKirova opened this issue Dec 9, 2024 · 1 comment · May be fixed by #15157
Open

[ELEMENTS] If grid is in hidden container and widths are in % an error is thrown. #15154

MayaKirova opened this issue Dec 9, 2024 · 1 comment · May be fixed by #15157
Assignees
Labels
🐛 bug Any issue that describes a bug 💠 grid: elements ✅ status: resolved Applies to issues that have pending PRs resolving them, or PRs that have already merged.

Comments

@MayaKirova
Copy link
Contributor

Description

It's a grid with 100% width, columns also have widths in % and some are hidden.

  • igniteui-angular version:
  • browser:

Steps to reproduce

  1. Run the attached sample:
    7f51fceb-a63e-45af-bf04-0dfbe720ec4d.zip

Error is thrown: Maximum call stack size exceeded

Result

Page hangs and error is thrown.

Expected result

No error is thrown.

Attachments

@MayaKirova
Copy link
Contributor Author

Same happens in a pure angular grid as well, you just have to have width:100% and columns in % with sum is less than 100.
The problem is that when in a hidden container, actual size is 0, so grid width is calculated based on the sum of visible columns. However the columns are then calculated as % of the grid width, hence on each iteration a new size is calculated and things go in an infinite loop.

Here's an angular sample with the scenario as well:
ntiwjqa9.zip

@MayaKirova MayaKirova added ✅ status: resolved Applies to issues that have pending PRs resolving them, or PRs that have already merged. and removed 🆕 status: new labels Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Any issue that describes a bug 💠 grid: elements ✅ status: resolved Applies to issues that have pending PRs resolving them, or PRs that have already merged.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants