PDA

View Full Version : Using TreeStore with ajax proxy.



aprajapati@vistaar.in
21 May 2017, 10:01 PM
Ext version tested:


Ext 6.5.0.755



Ext 6.2.1.167



Ext 6.2.0.981


Browser versions tested against:


Google Chrome 58.0.3029.110 (64-bit)


Description:


When rootProperty is provided in the proxy's reader config, it replaces the node's rootProperty as well. Hence the default rootProperty ("children") is not consumed.


Fiddle: https://fiddle.sencha.com/#view/editor&fiddle/1vvo

Steps to reproduce the problem:


Open the fiddle.
Expand the "homework" node.


The result that was expected:


It should contain "book report" & "algebra" as its children.



The result that occurs instead:


On expansion another request for data is being made.

evant
21 May 2017, 10:33 PM
This is the intended behaviour, it's been like this for quite a while, if I remember correctly. The root is used for the root all the way down.

If you want to use a "dynamic" root, then you can specify it as a function:



rootProperty: data => data.rootData || data.children,