Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Enhancement] Configurable sortable column with td-data-table #347

Closed
saurabh1e opened this issue Feb 17, 2017 · 2 comments
Closed

[Enhancement] Configurable sortable column with td-data-table #347

saurabh1e opened this issue Feb 17, 2017 · 2 comments
Milestone

Comments

@saurabh1e
Copy link
Contributor

It would be great if we can configure which column to sort, when using

<td-data-table
  [data]="filteredData"
  [columns]="columns"
  [sortBy]="sortBy"
  [sortable]="true"
  [sortOrder]="sortOrder"
  (sortChange)="sort($event)">
</td-data-table>

A property can be added to ITdDataTableColumn check whether column is sortable or not

columns: ITdDataTableColumn[] = [
    { name: 'sku', label: 'SKU #', tooltip: 'Stock Keeping Unit', sortable: true },
    { name: 'item', label: 'Item name' },
    { name: 'price', label 'Price (US$)', numeric: true, format: v => v.toFixed(2) },
  ];
@emoralesb05
Copy link
Contributor

Yes, totally agree! Thanks for bringing this up.

@emoralesb05 emoralesb05 added this to the Beta 3 milestone Feb 18, 2017
@emoralesb05 emoralesb05 modified the milestones: Beta 2, Beta 3 Feb 22, 2017
@ranouf
Copy link

ranouf commented Sep 9, 2017

Hi,

Where you use a custom template, when you put sortable: false in the column array, the parameter is not used by the component and the header is still sortable.
Can you fix the pb?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants