Skip to content
This repository has been archived by the owner on Dec 4, 2019. It is now read-only.

Data table doesnt load the data sometimes #271

Open
jakubbares opened this issue Feb 10, 2017 · 5 comments
Open

Data table doesnt load the data sometimes #271

jakubbares opened this issue Feb 10, 2017 · 5 comments

Comments

@jakubbares
Copy link

My implementation of data table about 25% of the time doesnt load the data, although further analysis showed the function to load the data was called successfully and data were there in $scope.data. Also the loading message did not show at all indicating there was some isssue initiating the loading.
Does any one know what could be the issue?

@jonshaffer
Copy link

Having a similar issue with a pretty updated fork, we mitigate it currently by either forcing digest's that aren't happening or re-instantiating the table (a lot of options-specific-logic exists only in compile, constructor, similar call-once functions - and there seems to be at least 6 or so missing $scope.$watch'es in this main table implementation for data at different levels depending on using paging, or other items)

That being said, we still haven't ironed this issue out, but it only happens >5% of the time with no known specific reproduction steps and we plan to fix that with a logic-flow refactor.

@jakubbares
Copy link
Author

@jonshaffer Hi Jon,
I now have an issue where the data never loads. I really dont understand, why. No errors in console.
Could you please elaborate on how you managed to solve such similar issue?
Forcing digests?
Reinstantiating the table?
I could not find in the documentation how to re-render the table for example.

@jonshaffer
Copy link

We've had to add scope watches to a lot of places and take code out of constructors to get this data table to work in a SPA search form. It's a little much to describe here, but basically most components in the table in this version have their logic executed once in constructors.

You could try one of these:

  1. Attach a codepen with what you're describing, so future people can benefit from conversation here
  2. Try my fork: https://github.com/jonshaffer/angular-data-table

Would love an update, or more info about what specifically you're seeing

@jakubbares
Copy link
Author

I would like to try rendering the table by a render function. Is there anything like that?
I would put the render function into https://css-tricks.com/using-requestanimationframe/ block

@jezrsmith
Copy link

I was having issues with the table not loading and using your fork fixed it - thanks jonshaffer

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

No branches or pull requests

3 participants