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

List refresh #186

Closed
aparolini opened this issue Nov 23, 2015 · 6 comments
Closed

List refresh #186

aparolini opened this issue Nov 23, 2015 · 6 comments
Assignees
Milestone

Comments

@aparolini
Copy link

Hello,

I have a changing list on the server.

I want my table to auto-load the list when the pages loads, thus I used bind-resource-callback. Then I want to be able to refresh my list by hand, thus I used bind-reload.

First bug: When I use bind-reload, the list is empty when the table appears the fist time. I have to click the button to invoke the reloadCallback. I want the list to be loaded without action the fist time!

Second bug: When using bind-reload and a filter, the paramsObj dosen't content the "filters" attribute.

Thanks in advance for your help

-antonio

@Zizzamia
Copy link
Owner

Ciao @aparolini,
the bind-reload functionality give to you the power to load the table when you want.
Here the official docs http://zizzamia.com/ng-tasty/directive/table-server-side/reload
as you can see you create a $scope.reloadCallback = function () {};
and you can just call that function when you load your page.
I hope can help!

About the second question, looks like a real bug, and I'm going to take care of that now!
Thanks

@Zizzamia Zizzamia added the bug label Dec 25, 2015
@Zizzamia Zizzamia added this to the Version 0.6.0 milestone Dec 25, 2015
@Zizzamia Zizzamia self-assigned this Dec 25, 2015
@Zizzamia
Copy link
Owner

Also I discover an other bug, to recreate we need change the page and after try to filter the table.
Will happened that the manul bind-reload will not work properly.

Zizzamia added a commit that referenced this issue Dec 25, 2015
@Zizzamia
Copy link
Owner

Your fix it's in the latest release https://github.com/Zizzamia/ng-tasty/releases/tag/v0.6.0

@memememetoo
Copy link

Can you please tell exactly how to solve Bug1 of @aparolini .

I wrote this to initialize the table on page load.

<div ng-init='reloadCallback()'></div>

But this is not working :(

@Zizzamia
Copy link
Owner

Bug1 was not a bug at all, it's just the way the table works, bind-reload gives to you the power to load when you want.

Did you try to do

$timeout(function () {
  reloadCallback();
});

It's possible you need wait a digest loop before start changing the table.

@memememetoo
Copy link

Great,
I will try it for sure :)

Thanks for the help

On Wed, Dec 30, 2015 at 8:12 AM, Leonardo Zizzamia <notifications@github.com

wrote:

Bug1 was not a bug at all, it's just the way the table works, bind-reload
gives to you the power to load when you want.

Did you try to do

$timeout(function () {
reloadCallback();
});

It's possible you need wait a digest loop before start changing the table.


Reply to this email directly or view it on GitHub
#186 (comment).

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

No branches or pull requests

3 participants