ngx-datatable
ngx-datatable copied to clipboard
table finished loading callback
I'm submitting a ... (check one with "x")
[ ] bug report => search github for a similar issue or PR before submitting
[x] feature request
[ ] support request => Please do not submit support request here, post on Stackoverflow or Gitter
Current behavior
I need to auto populate the search filter when the table is finished loading all the data. This always happens before table is finished loading so the filter never works.
Expected behavior
I would like to hook onto a "finished loading data" callback in order to automate the item from above.
Reproduction of the problem
This always happens before table is finished loading so the filter never works.
What is the motivation / use case for changing the behavior?
Our app is capturing contact information and certain clients need to compare each entry to external lists before they are allowed beyond step 1. I am currently showing a ngx-datatable onBlur of a input field for last name. This allows my client to search an external database for the user being added in order to validate items in upcoming steps (membership, rewards, blacklists, ect).
Please tell us about your environment:
mac OS el captain 10.11.6
- Table version: 0.8.x
Just updated it a few days ago so I assume it is a recent version.
- Angular version: 2.0.x
Angular version 5
- Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]
chrome
- Language: [all | TypeScript X.X | ES6/7 | ES5] all
It might not be the most elegant solution but I found a work around. I am using an observable in a service for the columns and rows and once the length of the rows object is > 0, I can execute my code and assume the table is "finished" loading.
This is so much important callback that is required when rendering is done. For example: when we are showing 10000+ records with 50+ columns. It is taking so much time to render.
I am facing the issue in one of my case where I am showing spinner to get the filtered result from backend but it removes the spinner because result received but rendering is not done. So callback event is required to control different userflows..
got any solution? @sacgrover
I'm loading a table with 10k+ rows and would like to scroll directly to the selected row. As of yet, there is no lifecycle hook that triggers the scrolling at the right time. Having a callback upon table load would be perfect for this use-case.
Right now, I have to use an ugly (and possibly unreliable) workaround, using setTimeout().
Therefore, I'd like to upvote this issue. 😃 👍
has a solution to this ever been found?
I don't think anyone actively working on it. Please implement it yourself and raise the PR.