Skip to content
This repository was archived by the owner on Feb 2, 2025. It is now read-only.

Reload data the angular-way and fixed columns #254

Closed
hcapitaine opened this issue Mar 19, 2015 · 13 comments
Closed

Reload data the angular-way and fixed columns #254

hcapitaine opened this issue Mar 19, 2015 · 13 comments
Labels
Milestone

Comments

@hcapitaine
Copy link
Contributor

When I use angular datatable with fixed column plugin, it works fine the first it renders the table the angular way but the second time the table disappears.

When I deactivate the plugin, everything works fine.

I had a look into the code and I don't understand why the table doesn't display.

In the renderDataTable method line 738, I put a breakpoint and look into both dt var. It contains everything to display the table.

Any ideas would be appreciated.

@PierreBrisorgueil
Copy link

Hey, i have the same problem.
if someone have an idea :)

Angular Way with fixed columns works fine, but if i filter the angular table (change the content), the table disappears.

I didn't find why, without fixed-columns, i have no problems.

@valiantvu
Copy link

+1

@l-lin
Copy link
Owner

l-lin commented Mar 29, 2015

Can you provide a plnkr or codepen to illustrate your issue?

@hcapitaine
Copy link
Contributor Author

Here is a plunker that shows the problem: First rendering ok, click on change data and it should work but the table disappears.
http://plnkr.co/edit/TilhXKEDDubEzqTnUNeE?p=preview

@l-lin l-lin added the bug label Apr 2, 2015
@l-lin l-lin added this to the v0.4.3 milestone Apr 2, 2015
@fforres
Copy link

fforres commented Apr 25, 2015

Anyone made any progress?
I'm having a similar issue, I create a table "The angular way".
But can't filter the data, if i input anything in the "search" input, or click o a column to sort the data, the table deletes every row.

@l-lin
Copy link
Owner

l-lin commented May 2, 2015

It seems that new $.fn.dataTable.FixedColumns(result.DataTable, options.fixedColumnsOptions); is manipulating the data of the table. Indeed, when adding new data to the table, the watcherCollection of the Angular renderer is called twice (as it should be called only once). I think the issue comes from here. But I don't know what trigger the watcher.

I can't seem to figure out how to solve this issue unfortunately 😞

@l-lin l-lin removed this from the v0.4.3 milestone May 2, 2015
@mjbrunme
Copy link

mjbrunme commented Jun 4, 2015

I just updated to the 0.4 release from 0.3 and I'm seeing this even more dramatically. I'm able to search and page through the data when it initially loads, but if I alter or filter the underlying data at all (which was working with 0.3) the entire table disappears, and I'm not using the fixedColumns plugin on the table.

To clarify: when I say the table "disappears", I don't mean the data is removed and I see "no data available". I meant the entire table including header/footer disappears from view.

@victor-litekey
Copy link

Has anyone have any luck here? I'm facing the same problem

@fforres
Copy link

fforres commented Jun 10, 2015

@victor-litekey

Maybe this could help

#300

@HaythemJ
Copy link

Hi,

It worked for me when I added the attribute dt-disable-deep-watchers="true" to the table.

Honnestly I don't know why it did work, if anyone knows the reason, please let me know.

@l-lin
Copy link
Owner

l-lin commented Jul 23, 2015

Oh nice catch @HaythemJ! Mmh... I see... Looks like rerendering causes this issue. Not sure why.

@l-lin l-lin added the TODO label Jul 23, 2015
@l-lin l-lin added this to the v0.5.2 milestone Dec 2, 2015
@l-lin
Copy link
Owner

l-lin commented Dec 2, 2015

Fixed in the newest version v0.5.2.
However, it needs a version of fixedColumns with 3.1.0+.

@duffmatthew
Copy link

I'm having this same issue in v0.5.4 and adding dt-disable-deep-watchers="true" did not help.

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

No branches or pull requests

9 participants