Results 1 to 3 of 3

Thread: Ext.selection.Model toggleOnClick broken

    You found a bug! We've classified it as EXTJS-14804 . We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.
  1. #1

    Default Ext.selection.Model toggleOnClick broken

    See for an example

    It appears that the toggleOnClick option of the Ext.selection.Model class is not functional due to the fact that its implementation in the source code is unreachable. The example is configured to use the toggleOnClick option of the Ext.selection.Model class. The selection mode is set to 'SINGLE' and allowDeselect is set to true.

    You can reproduce the problem by:
    Clicking once on an item in the DataView should cause it to become selected (it will turn from blue to green).
    Clicking the selected item once again should de-select the item (it should turn back to blue).

    Here is the source file that I have found the problem in:

    Within the source of the Ext.selection.Model class the only place that references the toggleOnClick var is in the selectWithEvent function on line 277 where it is only used in the case of a 'SINGLE' selection mode.

    However, the only place where the selectWithEvent function is called is from the onNavigate function on line 387 were it is only called in the case of a 'MULTI' selection mode

    It is impossible for the selection mode to be both MULTI and SINGLE. Therefore the implementation of toggleOnClick is not reachable.

    Perhaps a subclass does something differently, however the Ext.selection.DataViewModel that I have used in the example does not change this behavior.

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


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

  3. #3
    Sencha Premium User
    Join Date
    Nov 2013
    Piacenza, Italy


    This issue is not fixed yet 5 years later (Ext JS 7.0).

Posting Permissions

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