question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Order trigger doesn't work

See original GitHub issue

Hello, I have met an issue with ordering.

When I click on column name it just does nothing, even order icon doesn’t change.

Here is my code:

<md-card-content>
            <md-data-table-container>
                <table md-data-table>
                    <thead md-order="home.query.order" md-trigger="home.search">
                    <tr>
                        <th name="Name" order-by="lastName"></th>
                        <th name="Left company" order-by="endDate"></th>
                        <th name="Current Job" order-by="organizationName"></th>
                        <th name="Industry" order-by="industry"></th>
                        <th name="Locality" order-by="locality"></th>
                        <th name="Social networks"></th>
                    </tr>
                    </thead>
                    <tbody>
                    <tr ng-repeat="person in home.persons">
                        <td><a ng-link="person({id: person.id})">{{person.firstName + " " + person.lastName}}</a></td>
                        <td>
                            <span am-time-ago="person.jobs[person.jobs.length - 1].endDate"></span>
                            <span ng-hide="person.jobs[person.jobs.length - 1].endDate">Currently working</span>
                        </td>
                        <td>{{person.jobs[person.jobs.length - 1].position + ", " + person.jobs[person.jobs.length -
                            1].organization.name}}
                        </td>
                        <td>{{person.industry}}</td>
                        <td>{{person.locality}}</td>
                        <td>
                            <a href="https://www.linkedin.com/{{person.linkedinProfileId}}">Linkedin</a>
                        </td>
                    </tr>
                    </tbody>
                </table>
            </md-data-table-container>

            <md-data-table-pagination md-limit="home.query.limit" md-page="home.query.page"
                                      md-total="{{home.persons.length}}"
                                      md-trigger="home.search"></md-data-table-pagination>

        </md-card-content>

And controller:

vm.query = {
            organizationName: '',
            order: 'lastName',
            limit: 10,
            page: 1
        };

vm.search = search;

function search() {
                vm.persons = [];

                PersonsSearchFactory.query(vm.query,
                    function (data) {
                        vm.persons = data;
                    }, function (e) {
                        console.error(e);
                    });
}

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:17 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
justcaldcommented, Dec 3, 2015

I am having a very similar problem, where my

`md-trigger='onOrderChange'`

function never even gets hit when I click on the headers. The Icon on the header is there and recognizes that it’s clicked but my function in my directive never runs. I have the table inside of a directive and my function is inside of link in my directive . I think it might be a scope issue. When I put a breakpoint just after

`function postLink(scope, element, attrs, tableCtrl)`

attrs show that mdTrigger has been assigned onOrderChange, but nothing happens.

0reactions
ozasadnyycommented, Aug 30, 2015

After bower_components updating it has started to work. Thanks for you help.

Read more comments on GitHub >

github_iconTop Results From Across the Web

SQL Trigger does not work - Stack Overflow
You need to make it handle multiple record deletes which it currently cannot do. All triggers must always be written assuming that multiple...
Read more >
Troubleshoot common issues with triggers - Power Automate
Here are a few tips and tricks for troubleshooting issues with triggers. Identify specific flow run. Sometimes, you might need to Identify ...
Read more >
Why do I receive the message "Trigger order wasn't updated"?
I am currently working on organizing triggers within categories. After I drag the trigger to the new category, I click the Save button, ......
Read more >
Why did my GTT order trigger but was not executed?
In case a limit order is outside the circuit price , it is rejected and will not execute. GTT is completely free and...
Read more >
AR-15 Triggers: The Full Guide & Troubleshooting
We're breaking down the AR-15 trigger. We explain all the parts and types, how it works, and how to troubleshoot the AR-15's dreaded...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found