PDA

View Full Version : [5.0.1] Tree/Grid Panel view empty when store refreshed while hidden.



Artur Bodera (Joust)
9 Oct 2014, 12:10 AM
Another day, another Ext bug :-(

Tell me if you've already got this one filed or fixed, before I spend time on writing a fiddle.
Have a Tab panel (or any panel that hides and shows children)
Put a tree.Panel inside one of the tabs.
Load tree.Panel store.
Hide the tab (switch to another tab)
Reload store for tree.Panel twice (this is important as the first view refresh holds old dimensions).
Switch back to the Tab
The tree is empty.
... try to reload the store
... tree is still empty and will never work again.
The problem lies within BufferredRenderer and getLastVisibleRowIndex() which returns NaN in case the element is not visible (because me.rowHeight will get calculated as 0 and it will attempt division by zero).

Surprisingly it doesn't break normal grid.Panel that often, however it also happens sometimes.

Artur Bodera (Joust)
9 Oct 2014, 12:11 AM
Workaround: https://gist.github.com/Thinkscape/390378f2329b5328a36a

lnegi
9 Oct 2014, 5:07 AM
Your fix did not worked in my case.

When the treePanel is hidden , and you try to load it , it will not render the nodes upon show().
and it will not throw any error as well.

Artur Bodera (Joust)
9 Oct 2014, 5:46 AM
Interesting... it seems to work for me (with override). Let's wait for Sencha guys to come to work so they can take a look.

Gary Schlosberg
9 Oct 2014, 6:24 AM
Thanks for the report. I haven't been able to recreate this one. Can you please post a test case which reproduces the issue?
https://fiddle.sencha.com/#home