Results 1 to 2 of 2

Thread: Bug removing a TreeItem

  1. #1
    Ext User
    Join Date
    May 2008
    Posts
    97
    Vote Rating
    0
      0  

    Default Bug removing a TreeItem

    A bug that shows for me is that when I remove a BaseObject from a Tree by executing store.remove(baseObjChild, baseObjParent), and the child was the parent's last child, the parent will still keep its little arrow to the left and remains expandable (arrow points downwards then, but obviously no children are shown).

    IMHO, the bug lies in TreeItemUI.class:252, which reads:

    public void removeItem(TreeItem child) {
    containerEl.removeChild(child.getElement());
    if (item.getItemCount() == 0) {
    item.setExpanded(false);
    }
    }

    IMHO, it should read:

    public void removeItem(TreeItem child) {
    containerEl.removeChild(child.getElement());
    if (item.getItemCount() == 0) {
    item.setExpanded(false);
    item.setLeaf(false);
    }
    }

    Cheers,

    Joachim

  2. #2
    Ext User
    Join Date
    May 2008
    Posts
    97
    Vote Rating
    0
      0  

    Default

    Just tested it by changing the leaf property from a debug breakpoint, works for me like a charm.

Posting Permissions

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