sortable: false is being ignored
See original GitHub issueI’m submitting a … (check one with “x”)
[x] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, post on Stackoverflow or Gitter
Current behavior
sortable: false
in column definitions is being ignored.
Expected behavior
Columns defined with sortable: false
should not be sortable.
Reproduction of the problem
With remote sorting enabled, if you define your columns and assign them sortable: false
they are still sortable.
What is the motivation / use case for changing the behavior?
So you can make your columns unsortable.
Please tell us about your environment:
- Table version: 9.0.0
- Angular version: 4.0.0
- Browser: [all]
- Language: [all]
Issue Analytics
- State:
- Created 6 years ago
- Reactions:7
- Comments:8 (1 by maintainers)
Top Results From Across the Web
How to disable sorting on a column in a datatable
I tried adding this: data-sorter="false" to my <th> but it just ignored it. I also have tried this but it also just ignored...
Read more >bSortable: false ignored when using fnDrawCallback
Hi Allan, I've noticed that when using fnDrawCallback in datatables I can sort columns that have the bSortable property set to false.
Read more >Sorting Data Frames in Pandas: A Hands-On Guide | Built In
The columns above have been sorted in ascending alphabetical order. By setting ascending=False , we can sort in descending order also.
Read more >Is there a way for Excel to ignore values in formula when ...
Because right now, I can only sort from smallest to highest to see at once the data I need, because for FALSE results,...
Read more >sort-imports - ESLint - Pluggable JavaScript Linter
The import statement is used to import members (functions, objects or primitives) that have been exported from an external module.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@lobo-tuerto, curious, are you using
ngx-datatable-column
in your template? And if so, are you explicitly passing in[sortable]="columnObj.sortable"
or something like that?I got burned on that because I thought that if you pass columns into the
ngx-datatable
itself with a particular column havingsortable
be false, it would pick it up. However, apparently, if you specify a customngx-datatable-column
, you have to pass that input into that explicitly. Once you do, it does what you would expect.Perhaps, @amcdnl can correct me on that if I am wrong.
the following works for me:
<ngx-datatable-column [sortable]="false" prop="id" name="ID"></ngx-datatable-column>
using:
using version
11.2.0
with Angular 5