Results 1 to 3 of 3

Thread: 7.1: allowDEselect defaults to 'true' for Ext.grid.Panel

  1. #1

    Default 7.1: allowDEselect defaults to 'true' for Ext.grid.Panel

    In previous versions, the grid defaults 'allowDeselect' to 'false'. The documentation for 7.1 still states this to be the case, however, code was changed that now defaults it to 'true'. You can see the fiddle here:
    Run the program with 'EXT JS 7.1.0 - (Classic) Neptune' and notice that deselection is allowed (although it isn't specified in the config). Then switch to 'EXT JS 7.0.0 - (Classic) Neptune and notice that deselection is no longer allowed (e.g., working as it should).

    The issue comes down to the following line in the 'applySelectionModel' method in Ext.table.View:
    selModel = Ext.Factory.selection(Ext.apply({
      allowDeselect: grid.allowDeselect,
      locked: disableSelection
    }, selModel));
    selModel = Ext.Factory.selection(Ext.apply({
      allowDeselect: allowDeselect !== undefined ? allowDeselect : selModel.selectionMode !== 'SINGLE',
      locked: disableSelection
    }, selModel));
    Under 'default' conditions, 'selModel' is an Object containing a single property: type: 'rowmodel', and as such, will never even have a property named 'selectionMode', let alone have a value of 'SINGLE'.

  2. #2
    Sencha Premium User
    Join Date
    Dec 2015
    Cluj-Napoca, Romania


    @dan.everest: Just curious, how did you fix it? By setting allowDeselect or by overriding Ext.table.View?

  3. #3


    @abutnar, I overrode Ext.view.Table, copied the code from the 'applySelectionModel' in v 7.1, and changed the offending line back to how it was in v7.0.

    Incidentally, I just pulled the code for v7.2, and it appears as though they've fixed reverting back to the old way

Posting Permissions

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