-
Notifications
You must be signed in to change notification settings - Fork 221
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(collection): Add a list data loader (#2203)
Add a list data loader to help with dynamically loaded data from the server. Adds documentation, tests, and an example. [category:Components] Release Note: A data loader has been added to collections systems to make it easier to interact with server data. ```tsx const {model, loader} = useListLoader( { total: 1000, pageSize: 20, async load({pageNumber, pageSize}) { return fetch('/myUrl') .then(response => response.json()) .then(response => { return {total: response.total, items: response.items}; }); }, }, useListModel ); ```
- Loading branch information
1 parent
9304d13
commit 608e353
Showing
8 changed files
with
463 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.