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

Emit onDataFilled event for notifying when data has been recomputed #80

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mponizil
Copy link

@mponizil mponizil commented Feb 6, 2017

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 of mfTable.data has been computed, so some sort of nextTick 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 of ngOnChanges and ngDoCheck).

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant