Material-table: Remote data - orderBy null even if column defaultSort was set

Created on 30 Apr 2019  路  5Comments  路  Source: mbrn/material-table

Describe the bug
When use remote data, query.orderBy has null value even if column has set defaultSort.

To Reproduce
https://codesandbox.io/embed/4wy3loo469

Expected behavior
When fetching data with the API, it is a good solution to set the order in the backend, especially when only portions of data are returned.

bug

Most helpful comment

I published 1.34.2. Try it please

All 5 comments

Hi @wojtonow

I fixed this bug. It will be in next release. Thanks for feedback.

Published with 1.34.1

Thanks for the improvement but the change does not work as you would expect. In the first query, as orderBy, we get a column index, and after a manual sort change we get an object with a column definition. The data returned as orderBy should be the same in each case

I updated the example on codesandbox
https://codesandbox.io/embed/4wy3loo469

I published 1.34.2. Try it please

Now work's perfectly

Was this page helpful?
0 / 5 - 0 ratings

Related issues

timrchavez picture timrchavez  路  3Comments

ModPhoenix picture ModPhoenix  路  3Comments

roseak picture roseak  路  3Comments

behrouz-s picture behrouz-s  路  3Comments

ps1011 picture ps1011  路  3Comments