Comments (3)
Can you explain why you added the orderBy part of the filter? It will reorder the items in the array, but then tablesorter will reorder them again later in the filter.
from angular-tablesort.
Yeah, it's because of the additional sort buttons are little more complex than the table headers sorts. One example of the sorting buttons I need implemented says "Bring X to the top", now the value of X is coming through the service request, but isn't listed in as a table column. And to make it even more challenging, to sort the objects that contain this X value to the top, I have to do it in reverse. And if I use a ts-criteria, the user would have to hit the button twice in order to achieve the desired sort. I asked on an earlier ticket, if I can start sorting in reverse and I believe you said the answer was no.
from angular-tablesort.
But how can the orderBy statement have any effect at all? What ts-repeat does is that it effectively adds an extra orderBy clause to the end of the ng-repeat expression. The ng-repeat expression is a pipeline where parameters.response generates an array, orderBy rearranges the items in the array in a different order, filter:paramquery removes some entries from the array and then finally the orderBy added angular-tablesort reorders the items again. This means that the operation done by your orderBy filter is nullified by the orderBy added by angular-tablesort.
angular-tablesort can only sort by simple fields, it cannot take a sorting function. I think you are trying to do too much with angular-tablesort and you probably have to write your own custom tablesort routines.
from angular-tablesort.
Related Issues (20)
- Sort descending on first click HOT 2
- parseFloat not sorting as expected if column contains negative values HOT 1
- Add objects support HOT 3
- Icons doesnt show on table header
- Go to a specific page
- Possible usage with Pagination Directive HOT 1
- Numeric values are not compared as numbers HOT 1
- get the sorted data back from angular-tablesort HOT 2
- update versioning tag HOT 1
- collator undefined? HOT 1
- Add compare fallback
- Add 'No items' field when use ng-repeat in tbody HOT 1
- ITEMS_PER_PAGE doesn't update CURRENT_PAGE_NUMBER
- Programatically change sort option HOT 1
- Sorting without default sorting is incorrect
- No Explanation or Examples for Filtering Dates
- Pagination not displaying HOT 1
- adapt to PHP code HOT 1
- Don't interpolatie expression in ts-criteria filter parameter HOT 2
- ts-filter sorts by sorting criteria, instead of the displayed text HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from angular-tablesort.