Results 1 to 3 of 3

Thread: NestedList should provide option to drill-down on itemtap or disclosure

  1. #1
    Sencha Premium User
    Join Date
    Mar 2009
    Posts
    254

    Default NestedList should provide option to drill-down on itemtap or disclosure

    Here's the onItemTap method of NestedList:

    Code:
        onItemTap: function (list, index, target, record, e) {
            var me = this,
                store = list.getStore(),
                node = store.getAt(index);
    
    
            me.fireEvent('itemtap', this, list, index, target, record, e);
            if (node.isLeaf()) {
                me.fireEvent('leafitemtap', this, list, index, target, record, e);
                me.goToLeaf(node);
            }
            else {
                this.goToNode(node);
            }
        },
    It would be useful if NestedList can provide config options like:

    changeListOnItemTap

    and based on this value, executes a goToNode/goToLeaf instead of always doing it in onItemTap.
    Maybe, it can provide a similar option for disclosures too.

  2. #2
    Sencha Premium User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,379

    Default

    So you want a new config to be able to cancel the itemtap event and item change?
    Mitchell Simoens @LikelyMitch

    Check out my GitHub:
    https://github.com/mitchellsimoens

    Posts are my own, not any current, past or future employer's.

  3. #3
    Sencha Premium User
    Join Date
    Mar 2009
    Posts
    254

    Default

    Yes and no.
    See when you are using NestedList, in most use-cases, you want to tap the item as well as go into it (e.g. consider folders in NestedList, tapping brings up files in an adjoining dataview, zooming into via disclosure goes one level down into sub-folders).

    In every situation I have used NestedList (and there have been many), I always had a dataview bound to NestedList itemtap to show details and zooming into the list via disclosure. So on almost all occasions, I had to override NestedList's onItemTap to not zoom into automatically (which is the default behaviour).

    I might be wrong but I am assuming this is the most common use-case for NestedList. To me, NestedList is more or less a TreePanel substitute for mobiles, in Trees you can click on nodes (aka itemtap) as well as expand them (aka zoom into via disclosure). So what I am suggesting is to provide config options to control whether zoom-in happens via itemtap or via disclosure.

Posting Permissions

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