Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: Tree List - getting error as me.getFloated is not a function in AbstractTreeItem.js

    Success! Looks like we've fixed this one. According to our records the fix was applied for EXTJS-22613 in 6.2.1.167.
  1. #1
    Sencha User
    Join Date
    Apr 2015
    Location
    Hyderabad
    Posts
    18

    Default 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

  2. #2
    Sencha User dongryphon's Avatar
    Join Date
    Jul 2009
    Location
    Kansas
    Posts
    1,748

    Default

    Thanks for the report! I have opened a bug in our bug tracker.

  3. #3
    Sencha Premium User
    Join Date
    Apr 2011
    Posts
    49

    Default

    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;
    }
    }
    });

  4. #4
    Sencha Premium Member
    Join Date
    Aug 2014
    Posts
    15

    Default

    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!

  5. #5
    Sencha Premium Member
    Join Date
    Oct 2013
    Posts
    42

    Default

    +1 to fix that quickly!

  6. #6
    Sencha Premium User
    Join Date
    Feb 2016
    Location
    Houston, TX
    Posts
    1

    Default

    Fix it !!!

  7. #7
    Sencha Premium Member
    Join Date
    Jun 2014
    Posts
    15

    Default

    Thank you Dengqiao. It Works!!!

  8. #8
    Sencha Premium User
    Join Date
    Oct 2016
    Posts
    24

    Default

    this is still affecting 6.2.1.
    Any ETA on this ?

  9. #9

    Default

    Great JOB!!
    Thanks
    Albanir Neves

  10. #10

    Default

    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

Page 1 of 2 12 LastLast

Similar Threads

  1. Replies: 2
    Last Post: 14 Oct 2013, 1:26 PM
  2. Replies: 2
    Last Post: 4 Jun 2009, 1:24 AM
  3. [RESOLVED][2.2.1] Calling defined function throws a "is not a function" error
    By sam_mooball in forum Ext 2.x: Help & Discussion
    Replies: 5
    Last Post: 19 Apr 2009, 11:08 PM
  4. Tree in TabPanel ,switching panels causes tree to error
    By relix01 in forum Ext 2.x: Help & Discussion
    Replies: 4
    Last Post: 29 May 2008, 1:12 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •