Results 1 to 3 of 3

Thread: TreePicker doesn't allow customization of the underlying TreePanel

    This duplicates another forum thread, you can visit that thread here.
  1. #1
    Sencha User
    Join Date
    Feb 2014
    Posts
    8

    Default TreePicker doesn't allow customization of the underlying TreePanel

    First time posting in here. I've been using Ext 3.4 at my company for over a year now, we are a small team working on a massive 7+ year old enterprise product so we are finally getting around to upgrading to Ext 5.

    I'm using the Ext.ux.TreePicker, and found that the plugin doesn't offer enough customization of the underlying TreePanel. Looking at the source for the treepicker, it seems that when the treepanel is created, the code only grabs a select few configs passed in from its instantiation such as displayField, store, minHeight, maxHeight, and columns. This makes it difficult to build anything other than a basic treepanel without writing an extension.

    For example, I want to hide the root node of the treepanel (rootVisible: true), which is fairly common in my usage of treepanels, and I simply can't do it within the treepicker without writing an extension.

    A separate but related issue, is that I want to use checkboxes to allow the user to select multiple nodes in the treepicker, however the treepicker doesn't have multi select support. In order to do so, I need to override the selectItem method and perform the appropriate logic.

  2. #2
    Sencha User joel.watson's Avatar
    Join Date
    Nov 2014
    Posts
    3,120

    Default

    Quote Originally Posted by Edvardoh View Post
    First time posting in here. I've been using Ext 3.4 at my company for over a year now, we are a small team working on a massive 7+ year old enterprise product so we are finally getting around to upgrading to Ext 5.

    I'm using the Ext.ux.TreePicker, and found that the plugin doesn't offer enough customization of the underlying TreePanel. Looking at the source for the treepicker, it seems that when the treepanel is created, the code only grabs a select few configs passed in from its instantiation such as displayField, store, minHeight, maxHeight, and columns. This makes it difficult to build anything other than a basic treepanel without writing an extension.

    For example, I want to hide the root node of the treepanel (rootVisible: true), which is fairly common in my usage of treepanels, and I simply can't do it within the treepicker without writing an extension.

    A separate but related issue, is that I want to use checkboxes to allow the user to select multiple nodes in the treepicker, however the treepicker doesn't have multi select support. In order to do so, I need to override the selectItem method and perform the appropriate logic.
    Thanks for the feedback! As you can probably imagine, we've had prior requests for similar enhancements. I've linked this thread to a previous thread for which a feature request was created (EXTJS-16121).

    Thanks!
    Joel

  3. #3
    Sencha User razvanioan's Avatar
    Join Date
    Feb 2008
    Location
    Romania
    Posts
    135

    Default

    with simple override, you can pass any TreePanel config option towards TreePicker

    https://www.sencha.com/forum/showthr...=1#post1122151
    ---
    Razvan Ioan ANASTASESCU
    Senior WEB Developer

Tags for this Thread

Posting Permissions

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