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

st-sort-default="true" is not working fine with custom sort #7

Open
foxdog05000 opened this issue May 15, 2018 · 0 comments
Open

st-sort-default="true" is not working fine with custom sort #7

foxdog05000 opened this issue May 15, 2018 · 0 comments

Comments

@foxdog05000
Copy link

foxdog05000 commented May 15, 2018

Hello, the getter in st-multi-sort works very well except when initializing the table the sorting is done in a strange way. Despite the ridge of having put st-default-sort="true" I have the impression that the getter is not used during the first loading of the table.

But as soon as I sort the column the getter works perfectly !

  • AngularJS : 1.6.9
  • Smart table : 2.1.11
  • St-multi-sort : 1.1.11

Exemple (sample of my code)
<div st-safe-src="probes" st-table="displayProbes">
...
<th class="default-sort sortable" st-multi-sort="sortByName" st-sort-default="true" ng-click="sortColumn('name')"> {{'commons.tableHeader.name' | i18next}} </th>

scope.sortByName = function (row) { return row.name.toLowerCase(); };

Expected result:
image

Obtained result :
image

Plunker link

I'm participating in an issue on the smart-table depot. #773

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

No branches or pull requests

1 participant