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

Add a way to use 'last call arguments' as default arguments when listening to an Event #28

Closed
lucianoratamero opened this issue Jan 30, 2020 · 0 comments · Fixed by #30
Assignees
Labels
Next Release New feature or request for next release

Comments

@lucianoratamero
Copy link
Contributor

Most of the time, when listening to an Event, we want to repeat the last call made changing only what the new Event data is passing.

Example, we have a datepicker changing dates and multiple Events listening to the datepicker Event.
Now imagine one of these is a paginated call.
To make things work as expected, we currently need to remove the 'listenTo' for that paginated Event, register the Component that deals with the pagination to the datepicker Event and actively listen to it (on the componentDidUpdate hook), only to pass the correct data when teh date changes.

To solve this, we could have a way to reference the last call args to an Event on the default args declaration for the 'call' method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Next Release New feature or request for next release
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant