Skip to content

Change navigation type from mini to regular (or opposite) on resize causes rerender when the appbar is not fixed #1207

@Nureckiy

Description

@Nureckiy

When mini and non-mini layout types are used for different screen sizes and the position of the app bar is not fixed, screen resizing that causes the layout type to change will also unnecessarily re-render the component.

To Reproduce Steps to reproduce the behavior:

  1. Set different types of layouts (in my example, temporary-mini and full-height)
  2. Set fixed: false for appBarProps;
  3. Try resizing the screen to change the layout type
  4. See how the component is redrawn

Here is a sandbox describing the behavior (try clicking the "Click me" button to change the state of the component, then resize, the state will be reset): https://codesandbox.io/s/nervous-snowflake-spcbl

Screenshots
Before resize (test value is "TRUE"):
image

After resizing (state reset):
image

Package version is 2.9.0

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions