ember-table
ember-table copied to clipboard
Server-side sorting only
Hi there, ember-table is awesome btw.
We current have the million row table problem so we have implemented pagination to control filtering and sorting of the table by calling lastReached (at bottom of rows) and when sort order / filters change.
LastReached has an infinite loop problem if the vertical height is not defined in pixels btw. I was thinking of contacting the vertical-collection author about that.
The issue is that I'd like to disable the ember-table merge-sort capability completely with a parameter change or somesuch. Is this something available? I can't see it in the code. If not, could I do a PR to try to do this, I'm not the greatest JS coder but perhaps I could manage, I'd like to try. Of course I could go to another table widget but I really like ember-table.
Oh, also I cannot completely switch off sorts as my pagination needs the logic to maintain the sort state ie @onUpdateSorts
Is anyone reviewing new issues for ember-table?
Hi,
you have to put @sortFunction={{null}} in the t.head to disable sorting and add your custom sort logic in @onUpdateSorts
<t.head @sortFunction={{null}} @onUpdateSorts={{this.mySortFunction}} @sorts={{this.mySorts}} />
If you do so, you have to manually fill mySorts with the array of columns equal to what you get as parameter in mySortFunction. Refer to this Docs for more Details https://opensource.addepar.com/ember-table/docs/guides/header/sorting
Thank you, I will give that a try.
On Wed, Nov 3, 2021, 03:40 mwalper @.***> wrote:
Hi, you have to put @sortFunction={{null}} in the t.head to disable sorting and add your custom sort logic in @onUpdateSorts
<t.head @sortFunction={{null}} @onUpdateSorts={{this.mySortFunction}} @sorts={{this.mySorts}} />
If you do so, you have to manually fill mySorts with the array of columns equal to what you get as parameter in mySortFunction. Refer to this Docs for more Details https://opensource.addepar.com/ember-table/docs/guides/header/sorting
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Addepar/ember-table/issues/913#issuecomment-957929863, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASHVPCJM6WRAWMMT4RSZVYLUKAH7FANCNFSM5FQN2D7A . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.