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.

Call to this._getFlowDirection(this.parentElement, true); overwrites flex-direction set in stylesheet #364

@ppham27

Description

@ppham27

Commit #353 will set the flex-direction of the parent container to row when using fxFlex on a child element in this line. In our app, we set the flex-direction to column in a stylesheet, but the method only reads from the style attribute. Thus, the column flex-direction is overwritten.

This is where the child element sets the flex-direction of the parent element.

https://github.com/angular/flex-layout/blob/master/src/lib/flexbox/api/flex.ts#L162

My workaround has been to do

@Component({                                                                                       
  moduleId: module.id,                                                                             
  selector: 'my-app',                                                                       
  host: {                                                                                          
    style: 'flex-direction: column',                                                               
  },                                                                                               
  styleUrls: ['./my_app.css'],                                                              
  templateUrl: './my_app.ng.html',                                                          
}) 

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Issue that is important to resolve as soon as possiblebughas prA PR has been created to address this issue

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions