Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass component props to all resource methods #79

Open
Pareder opened this issue Mar 31, 2022 · 0 comments
Open

Pass component props to all resource methods #79

Pareder opened this issue Mar 31, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@Pareder
Copy link

Pareder commented Mar 31, 2022

Fo example there is some resource which endpoint depends on passed prop id:

endpoint: 'some/endpoint/:id/path'

This endpoint will work only once (when using prefetchResources for example), so that prop id will be passed to endpoint, but calling resource.fetch() will cause error, because id will be undefined.

Fix the logic of building endpoints so that component props will always be passed to it.

@Pareder Pareder added the enhancement New feature or request label Mar 31, 2022
@Pareder Pareder changed the title Add posibility to pass function that receives component props to defaultParams Pass component props to all resource methods Mar 31, 2022
@Pareder Pareder added bug Something isn't working and removed enhancement New feature or request labels Mar 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

1 participant