Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting errors when using fxFlex in template #25

Closed
ericcancil opened this issue Jan 31, 2018 · 1 comment
Closed

Getting errors when using fxFlex in template #25

ericcancil opened this issue Jan 31, 2018 · 1 comment
Labels

Comments

@ericcancil
Copy link

Using FxFlex as I do through the rest of the app, but getting errors when used inside the virtualscroll component

Below is the markup, and the error

Another strange issue I'm seeing is that no matter what height i set the scroll container to, it is expanded to the length of every item and it doesnt virtually scroll at all but displays them all.

Would appreciate your feedback, thanks

<od-virtualscroll [vsData]="data" [vsOptions]="options" fxFlex="100" fxFill class="vscrollcontainer" style="background-color: red">
      <ng-template let-item fxFlex="100">
        <mat-card>
          <app-date fxFill fxFlex="100" [date]="item" [showCancel]="false"></app-date>
        </mat-card>
      </ng-template>
    </od-virtualscroll>

ERROR TypeError: Cannot set property '-webkit-flex' of undefined
    at EmulatedEncapsulationDomRenderer2.DefaultDomRenderer2.setStyle (platform-browser.js:2924)
    at BaseAnimationRenderer.setStyle (animations.js:590)
    at DebugRenderer2.setStyle (core.js:15416)
    at eval (flex-layout.es5.js:208)
    at Array.forEach (<anonymous>)
    at applyMultiValueStyleToElement (flex-layout.es5.js:204)
    at applyStyleToElement (flex-layout.es5.js:179)
    at FlexDirective.BaseFxDirective._applyStyleToElement (flex-layout.es5.js:699)
    at FlexDirective._updateStyle (flex-layout.es5.js:2836)
    at FlexDirective._onLayoutChange (flex-layout.es5.js:2823)
@dinony
Copy link
Owner

dinony commented Jan 31, 2018

Please check the discussion on angular/flex-layout + od-virtualscroll in this issue.

A coarse TLDR:

  • Regarding angular/flex-layout: You have to use inline-flex for the cells. See issue.
  • Regarding od-virtualscroll: Dynamic sizing is not supported yet, but it will come :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants