Griddle icon indicating copy to clipboard operation
Griddle copied to clipboard

Uncaught Error: Invariant Violation when using children and dynamically changing `result`

Open dearlordylord opened this issue 10 years ago • 5 comments

When I have children for some of my rows, and dynamically changing input data (result=), i.e. just filtering it for some rows, I get error


Uncaught Error: Invariant Violation: processUpdates(): Unable to find child 22 of element. This probably means the DOM was unexpectedly mutated (e.g., by the browser), usually due to forgetting a <tbody> when using tables, nesting tags like <form>, <p>, or <a>, or using non-SVG elements in an <svg> parent. Try inspecting the child nodes of the element with React ID `.0.2.0.0.0

After which data isn't filtered and child expand link cease to work.

dearlordylord avatar Apr 15 '15 12:04 dearlordylord

Hey @Firfi -- thanks for reporting this. Do you have a repo that I can pull down to see this behavior? Thanks!

ryanlanciaux avatar Apr 25 '15 18:04 ryanlanciaux

Hey @ryanlanciaux, nope doesn't have one. I forgot how to reproduce it also as decided not to use children in table for now : (

dearlordylord avatar Apr 25 '15 19:04 dearlordylord

Hi @ryanlanciaux, @Firfi!

I encountered the same problem. It seems to occur when you have a mixture of rows that have subgrids and rows with no subgrids.

All I have for show right now is this screenshot: auto-tbody

There's a tbody with no reactid and within it are tr with reactids. Those two tr do not have subgrids.

I've tried griddles with all rows having subgrids. It worked fine. I've tried griddles with all rows having no subgrids. It worked fine as well.

Error only occurs after you've attempted filtering a griddle whose rows are mixed with subgrids and no subgrids.

I will add code snippets that replicate the problem later.

istisiki avatar May 27 '15 13:05 istisiki

Same here, thanks @istisiki for pointing to the

. Did some tests and can also confirm that mixing standard rows with parent/child rows causes React to be sad.. :) I was wondering why that subgrid example works since it also uses not only parent rows but apparently it works because all of the initial rows have children rows.

When no child rows are present -

gets reactid, and when there are at least one - parent row gets it's own with reactid but all the standard rows remain without reactid. Hope that helps.

Any suggestions how to solve this?

rusenask avatar Sep 10 '15 13:09 rusenask

Is there any resolution planned for this? I couldn't get it to work with custom rows either.

I have a proposed fix for this. It works for me as as far as I can tell. It will have to be edited to work with the rest of the Griddle configurations like filtering etc. However even in this example http://griddlegriddle.github.io/Griddle/subgrids.html filtering is completely broken when subgrids are open.

albertolacework avatar Oct 16 '15 21:10 albertolacework