Skip to content
This repository was archived by the owner on Sep 5, 2024. It is now read-only.
This repository was archived by the owner on Sep 5, 2024. It is now read-only.

mdVirtualRepeat: does not respect md-on-demand boolean value #7063

@vinaygopinath

Description

@vinaygopinath

I'm using angular-material 1.0.4 and md-virtual-repeat does not seem to consider the value of md-on-demand when I use the following code (numbers is a plain old array)

<md-virtual-repeat-container id="list-container">
      <div md-virtual-repeat="num in numbers" md-on-demand="false">
        {{num}}
      </div>
</md-virtual-repeat-container>

I see this error:

Error: When md-on-demand is enabled, the Object passed to md-virtual-repeat
must implement functions getItemAtIndex() and getLength()

Plunkr

Removing the attribute solves the problem. I'd consider doing that, but in my case, I'm wrapping md-virtual-repeat within a directive that determines if the list is paginated (md-on-demand=true), or a bulk array of elements (md-on-demand=false, like the vertical usage example in the demo page) based on some factors.

Metadata

Metadata

Assignees

No one assigned

    Labels

    pr: merge readyThis PR is ready for a caretaker to review

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions