Success! Looks like we've fixed this one. According to our records the fix was applied for
EXTJS-22613
in
6.2.1.167.
-
Sencha User
Tree List - getting error as me.getFloated is not a function in AbstractTreeItem.js
Hi,
When using Tree List i am getting error as me.getFloated is not a function in AbstractTreeItem.js in browser console.
I am facing the above issue only in 6.2 early access as well as in 6.2 generally available.
When i compared the 6.2 AbstractTreeItem.js with Extjs 6.0.2 AbstractTreeItem.js.
floated: false is missing in 6.2 version, When i added the property in 6.2 and build the application it is working fine.
Please let me know is it the right solution.
Tree List is not rendering properly because of the above issue.
Regards
Sandeep
-
Thanks for the report! I have opened a bug in our bug tracker.
-
Sencha Premium User
It‘s only override Ext.list.TreeItem(Ext.overrides.list.TreeItem) in Ext-all-debug.js,and Ext.list.Tree use Ext.list.RootTreeItem.
So I override Ext.list.RootTreeItem,It's OK.
Ext.define('Overrides.list.RootTreeItem', {
override: 'Ext.list.RootTreeItem',
config: {
floated: null
},
// Implement a setter.
// There *is* no "floated" config in Classic.
// We're still an inner item, we just get put inside a Container.
setFloated: function(floated) {
var me = this,
el = me.element,
placeholder = me.placeholder,
node, wasExpanded;
if (me.treeItemFloated !== floated) {
if (floated) {
placeholder = el.clone(false, true);
// shallow, asDom
placeholder.id += '-placeholder';
// avoid duplicate id
me.placeholder = Ext.get(placeholder);
me.wasExpanded = me.getExpanded();
me.setExpanded(true);
el.addCls(me.floatedCls);
el.dom.parentNode.insertBefore(placeholder, el.dom);
me.floater = me.createFloater();
}
// toolkit-specific
else if (placeholder) {
wasExpanded = me.wasExpanded;
node = me.getNode();
me.setExpanded(wasExpanded);
if (!wasExpanded && node.isExpanded()) {
// If we have been floating and expanded a child, we may have been
// expanded as part of the ancestors. Attempt to restore state.
me.preventAnimation = true;
node.collapse();
me.preventAnimation = false;
}
me.floater.remove(me, false);
// don't destroy
el.removeCls(me.floatedCls);
placeholder.dom.parentNode.insertBefore(el.dom, placeholder.dom);
placeholder.destroy();
me.floater.destroy();
me.placeholder = me.floater = null;
}
// Use an internal property name. We are NOT really floated
me.treeItemFloated = floated;
}
},
getFloated: function() {
return this.treeItemFloated;
},
runAnimation: function(animation) {
return this.itemContainer.addAnimation(animation);
},
stopAnimation: function(animation) {
animation.jumpToEnd();
},
privates: {
createFloater: function() {
var me = this,
owner = me.getOwner(),
ownerTree = me.up('treelist'),
floater,
toolElement = me.getToolElement();
me.floater = floater = new Ext.container.Container({
cls: ownerTree.self.prototype.element.cls + ' ' + ownerTree.uiPrefix + ownerTree.getUi() + ' ' + Ext.baseCSSPrefix + 'treelist-floater',
floating: true,
// We do not get element resize events on IE8
// so fall back to 6.0.1 sizing to 200 wide.
width: Ext.isIE8 ? 200 : (ownerTree.expandedWidth - toolElement.getWidth()),
shadow: false,
renderTo: Ext.getBody(),
listeners: {
element: 'el',
click: function(e) {
return owner.onClick(e);
}
}
});
floater.add(me);
floater.show();
floater.el.alignTo(toolElement, 'tr?');
return floater;
}
}
});
-
Sencha Premium Member
In Germany in such a case we would say "Wie krass ist dass denn! (really phat!)".
You (Sencha) deliver a new GA release with bugs that make your own examples (see 6.2 examples ==> admin dashboard) not work. You then create an override for the example (see 6.2 examples adminDashboard ==> app.js line > 533397) instead of removing the bug in the GA release.
Great job!
-
Sencha Premium Member
-
Sencha Premium User
-
Sencha Premium Member
Thank you Dengqiao. It Works!!!
-
Sencha Premium User
this is still affecting 6.2.1.
Any ETA on this ?
-
Sencha User
-
27 Jan 2017, 12:23 PM
#10
Sencha User
Excelente, Gracias por el aporte, aunque fue hace mucho, el día de hoy me sirvió perfectamente, muchas gracias!!
Excellent, Thanks for the contribution, although it was a long time ago, it served me well today, thank you very much [Google Translator] :P