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

Server-side sorting only #913

Open
poloniousteam opened this issue Oct 7, 2021 · 3 comments
Open

Server-side sorting only #913

poloniousteam opened this issue Oct 7, 2021 · 3 comments

Comments

@poloniousteam
Copy link

poloniousteam commented Oct 7, 2021

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

@poloniousteam
Copy link
Author

Is anyone reviewing new issues for ember-table?

@mwalper
Copy link

mwalper commented Nov 2, 2021

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

@poloniousteam
Copy link
Author

poloniousteam commented Nov 2, 2021 via email

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

No branches or pull requests

2 participants