Initiliazing Filter tables with async data
Hi
When i init the table with custom filter like this example => http://bazalt-cms.com/ng-table/example/11 inside a rest api call i get the following error: Error: Function names($column) must be instance of $q.defer()
when immediatly init the table then the data that the dropdown filter should show hasnt loaded yet and it also doesnt update.
Thx for your concern
Did you ever figure this out? I am encountering the same error message
Same issue here.
Seems to be a problem for me too. I'm trying to introduce my own filter ajax function, due to a humongous dataset of filters
The following pull request fixes this issue: https://github.com/esvit/ng-table/pull/342
I am new to github. Is there a way to fork the original repo and then merge your pull request with it so I can have the fix?
Look up how to apply a patch. You can use this pull request URL as a patch URL on your repo.
On Saturday, September 6, 2014, realityfluxstudios [email protected] wrote:
I am new to github. Is there a way to fork the original repo and then merge your pull request with it so I can have the fix?
— Reply to this email directly or view it on GitHub https://github.com/esvit/ng-table/issues/215#issuecomment-54684269.
This patch #323 doesn't help.
When immediatly init the table then the data that the dropdown filter should show hasnt loaded yet and it also doesnt update.
When load all data and then init table — filter function called first (before loading) and return empty array
What does patch #323 have to do with this thread? :)
Patch #342 addresses the issue, but it might be outdated since there seem to now be merge issues with the current version of ng-table. Test it out with the version that was relevant when I first posted it, and I can adjust it to the current version.
It's currently working beautifully in production on a project.
Sorry, wrong number. Of course, we talk about #342
I created example to show my problem http://plnkr.co/edit/XJo9rp
So... how in index.js:5 in $scope.ages can I get data from index.js:19 Api.get(params.url(), function(data)?
Maybe my logic is wrong, then show me right way.
Thank a lot!
Create a plunkr example for our problem.
http://plnkr.co/edit/XJo9rp?p=preview — SOLUTION
Found solution for my question. Unfortunately, need to create two similar requests, when getting data for table and filter.
But it works.