Results 1 to 3 of 3

Thread: How to navigate NestedList on itemDoubleTap instead of itemtap?

  1. #1
    Sencha User
    Join Date
    Aug 2011
    Posts
    69
    Answers
    1

    Default Answered: How to navigate NestedList on itemDoubleTap instead of itemtap?

    Hi, I have a NestedList and all records are equally important, so I need to be able to select items on itemtap on any level, or to navigate deeper on itemDoubleTap. Do I have to override original functions, or is there any other way? Can you please give me an example how to override onItemTap public method to perform selection, and onItemDoubleTap to perform navigation that was used by onItemTap? The other thing that comes to my mind is a little arrow button on each item, but still, I need to prevent original navigation and change it to selection.
    Thank you!

  2. Well, that is something that I might need later. For now I have decided to extend original NestedList and remove eventListener that is used on item tap, add new listener - "selecting" logic on itemtap by the original list component, and ondoubletap event uses former onitemtap.

    The code that I have used is simply:

    this.onItemDoubleTap = this.onItemTap;
    this.removeListener('itemtap', this.onItemTap, this);
    this.on('itemdoubletap', this.onItemDoubleTap, this);

  3. #2
    Sencha Premium Member
    Join Date
    Nov 2007
    Location
    Moore, Oklahoma
    Posts
    502
    Answers
    10

  4. #3
    Sencha User
    Join Date
    Aug 2011
    Posts
    69
    Answers
    1

    Default

    Well, that is something that I might need later. For now I have decided to extend original NestedList and remove eventListener that is used on item tap, add new listener - "selecting" logic on itemtap by the original list component, and ondoubletap event uses former onitemtap.

    The code that I have used is simply:

    this.onItemDoubleTap = this.onItemTap;
    this.removeListener('itemtap', this.onItemTap, this);
    this.on('itemdoubletap', this.onItemDoubleTap, this);
    Last edited by MaciejZabielski; 18 Sep 2011 at 10:53 PM. Reason: code added

Posting Permissions

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