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

Client-side ordering doesn't work without md-trigger #119

@videege

Description

@videege

Hello,

I noticed that when I'm trying to do client-side ordering, I must provide an md-trigger attribute or else the orderBy target isn't updated until I trigger a digest elsewhere on the page (for example, by selecting a row). Here's the code setup (with the noop function for the trigger):

<md-data-table-container>
            <table md-data-table md-row-select="vm.selected">
                <thead md-order="vm.order" md-trigger="vm.noop">
                    <tr>
                        <th order-by="code" name="Code"></th>
                        <th order-by="clientName" name="Name"></th>
                    </tr>
                </thead>
                <tbody>
                    <tr ng-repeat="client in vm.clients | orderBy: vm.order | limitTo: vm.limit: (vm.page - 1) * vm.limit" md-auto-select>
                        <td>{{client.code}}</td>
                        <td>{{client.clientName}}</td>                           
                    </tr>
                </tbody>
            </table>
        </md-data-table-container>

Is this intentional? The docs seem to indicate that you can omit the md-trigger attribute when doing client-side ordering.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions