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

GRID: When switching to a layout with more rows, the bottom rows are not displayed #28

Open
5 tasks done
K1vs opened this issue Jul 1, 2024 · 2 comments
Open
5 tasks done
Labels
bug Something isn't working

Comments

@K1vs
Copy link

K1vs commented Jul 1, 2024

Describe the bug 📝

I have created a Grid like in the example (https://thatopen.github.io/engine_ui-components/examples/Grid/) where there are 2 layouts.
One with two row, the other with three.
Switching from a three-row to a two-row layout takes place without any problems.
But when switching from two-row to three-row , the bottom row is not displayed.
Since the original example works, I understood why - because there is a phase with an undefined layout.
Based on this I found a workaround:

    if(layout === "three-row"){
      this._grid.layout = undefined;
      setTimeout(() => {
        this._grid.layout = layout;
      }, 100);
    } else {
      this._grid.layout = layout;
    }

But it has side effects and needs to have a real fix.

Reproduction ▶️

No response

Steps to reproduce 🔢

  1. Create Grid
  2. Add layout with 2-row template
  3. Add layout with 3-row template
  4. Set 2-row as initial
  5. Add button to change layout to 3-row
  6. Run app
  7. Click layout switch button
  8. See on screen - 3-rd row does not apear

System Info 💻

System:
    OS: Windows 11 10.0.22631
    CPU: (20) x64 12th Gen Intel(R) Core(TM) i7-12700K
    Memory: 18.51 GB / 31.79 GB
  Binaries:
    Node: 20.10.0 - C:\Program Files\nodejs\node.EXE
    npm: 10.2.5 - C:\Program Files\nodejs\npm.CMD
    pnpm: 8.5.1 - ~\AppData\Roaming\npm\pnpm.CMD
  Browsers:
    Edge: Chromium (126.0.2592.81)
    Internet Explorer: 11.0.22621.3527

Used Package Manager 📦

npm

Error Trace/Logs 📃

No response

Validations ✅

  • Read the docs.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Make sure this is a repository issue and not a framework-specific issue. For example, if it's a THREE.js related bug, it should likely be reported to mrdoob/threejs instead.
  • Check that this is a concrete bug. For Q&A join our Community.
  • The provided reproduction is a minimal reproducible example of the bug.
@K1vs K1vs added the bug Something isn't working label Jul 1, 2024
@HoyosJuan
Copy link
Member

Hey @K1vs!

May you please tell me the layout templates used? So I can test with your same example.

@HoyosJuan
Copy link
Member

Hey @K1vs! Any updates on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants