Skip to content

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

@K1vs

Description

@K1vs

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.

Activity

added
bugSomething isn't working
on Jul 1, 2024
HoyosJuan

HoyosJuan commented on Jul 1, 2024

@HoyosJuan
Member

Hey @K1vs!

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

HoyosJuan

HoyosJuan commented on Jul 16, 2024

@HoyosJuan
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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @K1vs@HoyosJuan

        Issue actions

          GRID: When switching to a layout with more rows, the bottom rows are not displayed · Issue #28 · ThatOpen/engine_ui-components