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.

Sorting not working on using 'Template', 'Flex', on using flex for column, resizing is an issue

See original GitHub issue

I’m submitting a … (check one with “x”)

[ ] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here

Current behavior

Expected behavior

Reproduction of the problem

What is the motivation / use case for changing the behavior?

Please tell us about your environment:

  • Table version: 7.3.0
  • Angular version: 4.0.2
  • Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]
  • Language: [all | TypeScript X.X | ES6/7 | ES5]

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:2
  • Comments:17 (2 by maintainers)

github_iconTop GitHub Comments

29reactions
mikevandonselaarcommented, Apr 26, 2017

Make sure you put let-sort="sortFn" in your ng-template and make sure to encapsulate your content in a class with a span <span (click)="sort()">Your Content here </span>

This was the case for me. Here’s a full code example of my column template:

<ngx-datatable-column name="Description"> <ng-template let-column="column" let-sort="sortFn" ngx-datatable-header-template> <span (click)="sort()">Your Content Here</i></span>Beschrijving </ng-template> </ngx-datatable-column>

1reaction
katestearns-suplaricommented, Sep 8, 2017

Any updates on the sorting for a custom Template? I found if I add a font-awesome icon as the content to a sort-btn class it will work, but I don’t want a sort for all tables. Adding sortable:false does not change this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Ordering flex items - CSS: Cascading Style Sheets | MDN
Items have a number showing their source order which has been rearranged. You can play around with the values in this live example...
Read more >
Flexbox won't wrap on browser resize - Stack Overflow
In your CSS, I changed your animation with a more simple opacity and translateY transition (you have to go to point A to...
Read more >
Equal Columns With Flexbox: It's More Complicated Than You ...
This happens because of how flexbox calculates the base size of an element. You've probably read lots of flexbox tutorials, and many of...
Read more >
A Comprehensive Guide to Flexbox Ordering & Reordering
A Comprehensive Guide to Flexbox Ordering & Reordering ... The flexbox layout module allows us to lay out flex items in any order...
Read more >
Column Resizing: Core Feature of our Datagrid - AG Grid
If you manually resize a column with flex either via the API or by dragging the resize handle, flex will automatically be disabled...
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