Skip to content

UI collapses when dark_mode = None and page contains grid with ag grid #4886

@BaccanoMob

Description

@BaccanoMob

First Check

  • I added a very descriptive title here.
  • This is not a Q&A. I am sure something is wrong with NiceGUI or its documentation.
  • I used the GitHub search to find a similar issue and came up empty.

Example Code

from nicegui import ui

@ui.page(path="/")
async def error_causer():
    ui.dark_mode(None)

    with ui.grid().classes("items-start place-items-stretch w-full grid-cols-2"):
        ui.aggrid({})
        ui.button()

ui.run()

Description

With commenting ui.dark_mode,

Image

Without commenting ui.dark_mode,

Image

If I set dark=None in run,

Image

The bug does not happen if there are buttons only (possibly if its only quasar components I believe)

I wanted to have an ag grid on left some content on the right. And I have managed to get a minimal reproducible code. I do not know what causes it so please change the title if the cause is something else.

For now I will stick with True/False for dark mode.

NiceGUI Version

2.20.0

Python Version

3.12

Browser

Chrome

Operating System

Linux

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugType/scope: A problem that needs fixingreviewStatus: PR is open and needs review🟠 majorPriority: Important, but not urgent

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions