adminjs
adminjs copied to clipboard
Allow `UseRecordsResult.fetchData` to accept options
Describe the problem feature solves
It's not possible to set query params, e.g., page, per page, when making a request for resources when using the hook in a custom component.
Describe the solution you'd like
Pass options from fetchData to the resourceAction and fall back to current behavior.
Describe alternatives you've considered
The alternative is to use the ApiClient directly and manually specify the params.
Acceptance criteria
- [ ] pass options from
fetchDatatoresourceActionwith current behavior as a fallback if option is blank
fetchData reads these from search params so you can achieve this by setting perPage, etc in your browser's address bar. We could technically allow to pass custom options though.