Skip to content
This repository was archived by the owner on Jan 6, 2025. It is now read-only.
This repository was archived by the owner on Jan 6, 2025. It is now read-only.

fxHide doesn't work on page load #848

@srcn

Description

@srcn

Bug Report

What is the expected behavior?

fxHide must hide the content on page load.

What is the current behavior?

It doesn't work as expected on page load.

What are the steps to reproduce?

https://stackblitz.com/edit/angular-gqvksp

<div fxHide fxShow.gt-sm>

  <div fxLayout="row" fxLayoutAlign="start center" fxFlex="0 1 auto">

      This content doesn't get hidden on small screen size!

  </div>
  
</div>

There is no fxLayout on the parent element, and because of that, fxFlex puts display: flex to the parent item in order to work correctly and that overrides the display: none from fxHide.

If I put fxLayout="row" to the parent element, fxHide works as expected. It also works correctly when resizing the window.

What is the use-case or motivation for changing an existing behavior?

It's a bug.

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

flex-layout 6.0.0-beta.17 & beta.18, Angular 6.x, Chrome (MacOS), Firefox (MacOS) & Safari (MacOS)

Is there anything else we should know?

Related issues: #812 , #814

Metadata

Metadata

Assignees

Labels

P0Critical issue that needs to be resolved immediatelybughas prA PR has been created to address this issuein-progress

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions