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

Initiliazing Filter tables with async data #215

Closed
HelgeWieding opened this issue Feb 19, 2014 · 11 comments
Closed

Initiliazing Filter tables with async data #215

HelgeWieding opened this issue Feb 19, 2014 · 11 comments

Comments

@HelgeWieding
Copy link

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

@apoku
Copy link

apoku commented May 27, 2014

Did you ever figure this out? I am encountering the same error message

@sathify
Copy link

sathify commented Jun 3, 2014

Same issue here.

@etodanik
Copy link

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

@etodanik
Copy link

The following pull request fixes this issue:
#342

@realityfluxstudios
Copy link

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?

@etodanik
Copy link

etodanik commented Sep 6, 2014

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 notifications@github.com
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
#215 (comment).

@Seigiard
Copy link

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

@etodanik
Copy link

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.

@Seigiard
Copy link

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!

@Seigiard
Copy link

Create a plunkr example for our problem.

@Seigiard
Copy link

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.

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

No branches or pull requests

7 participants