Skip to content

[DataGrid] Grid style updates don't cause re-render #7962

Closed

Description

@lukasolson

Describe the bug
CodeSandbox here: https://codesandbox.io/s/quirky-fire-cpj3v7?file=/demo.js

When the DataGrid accepts a gridStyle prop, updates to that prop don't cause the data grid to re-render.

In the above example, if you use the data grid controls to change the density, you'll see the grid re-render in response. However, if you click the button at the top "Reset to Compact", which explicitly sets the grid style to compact, it doesn't re-render (even though you can see the console logging the new grid style):

Screen.Recording.2024-08-13.at.2.32.23.PM.mov

Impact and severity
This isn't currently a big issue, but it was found as part of elastic/kibana#188495 (comment). We will have a workaround for that PR, but it would be nice if this could be fixed so the workaround can be removed.

Activity

  1. added
    ⚠️ needs validation
    on Aug 13, 2024
  2. pamellix commented on Aug 14, 2024

    @pamellix

    @lukasolson I'll try to fix it

  3. removed
    ⚠️ needs validation
    on Aug 19, 2024
  4. JasonStoltz commented on Aug 19, 2024

    @JasonStoltz
    Contributor

    Thanks ya'll! We've added this to our backlog. We would be super happy to receive a PR for this -- otherwise we'll lump this into some larger Data Grid work we're planning for this quarter.

  5. self-assigned this
    on Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions