adminjs icon indicating copy to clipboard operation
adminjs copied to clipboard

Allow `UseRecordsResult.fetchData` to accept options

Open TaylorBriggs opened this issue 4 years ago • 1 comments

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 fetchData to resourceAction with current behavior as a fallback if option is blank

TaylorBriggs avatar Oct 13 '21 14:10 TaylorBriggs

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.

dziraf avatar Nov 12 '21 10:11 dziraf