Emit onDataFilled event for notifying when data has been recomputed #80
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi there,
Thanks for your work on this library - I've found it to be pleasantly lightweight and flexible!
We have the use-case where we want to fetch additional data for each row when it comes into view (e.g. due to sort change, page change, new input data, etc) and I couldn't come up with a clean way to do this via
onPageChange
.From what I have observed,
onPageChange
may fire before the latest version ofmfTable.data
has been computed, so some sort ofnextTick
would be necessary. Also this event appears to fire too often for our use case (3 times on initial render, twice when input data changes because ofngOnChanges
andngDoCheck
).Do you have any suggestions for this use case? The solution I'm submitting here seems to do the job, but certainly interested in hearing other ideas.
Happy to add tests if this does look like something you'd like to pull in.
Cheers,
Misha