angular-data-table icon indicating copy to clipboard operation
angular-data-table copied to clipboard

Data table doesnt load the data sometimes

Open jakubbares opened this issue 8 years ago • 5 comments

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?

jakubbares avatar Feb 10 '17 14:02 jakubbares

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.

jonshaffer avatar Feb 10 '17 17:02 jonshaffer

@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.

jakubbares avatar Feb 20 '17 11:02 jakubbares

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

jonshaffer avatar Feb 21 '17 02:02 jonshaffer

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

jakubbares avatar Mar 29 '17 12:03 jakubbares

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

jezrsmith avatar Sep 06 '17 14:09 jezrsmith