Description
🙋 Feature Request
On initial load, it would be nice if the sort
option in useAsyncList was automatically called if the initialSortDescriptor
option is also provided.
Alternatively, if this is not possible, it would be nice to update the doc page for useAsyncList
to explicitly show that the user is responsible for managing the sort. The current documentation gives the impression that client-side sorting will be applied after implementing the provided code example, when in reality the final step is to manually call the sort
option.
🤔 Expected Behavior
When passing a sort
and initialSortDescriptor
option, useAsyncList
would automatically call the passed sort
option upon resolving the initial async load
.
😯 Current Behavior
Currently, the user is responsible for managing when the first client-side sort is applied, even though the expectation would be to apply the sort automatically especially if an initialSortDescriptor
is also provided.
💁 Possible Solution
See Expected Behavior
🔦 Context
After reading examples in the documentation of useAsyncList
, it gives the impression that client-side sorting will be applied after supplying the sort
option to useAsyncList
. This doesn't seem to be the case, but the docs also don't offer any suggestions on how to apply that first sort.
💻 Examples
https://codesandbox.io/s/listview-with-useasynclist-4cozi2?file=/src/App.js
🧢 Your Company/Team
Adobe Assets Essentials
🎁 Tracking Ticket (optional)
Metadata
Metadata
Assignees
Type
Projects
Status
📋 Waiting for Sprint