Results 1 to 3 of 3

Thread: Configure CellEditing plugin using declarative syntax

    Looks like we can't reproduce the issue or there's a problem in the test case provided.
  1. #1
    Sencha User
    Join Date
    May 2014
    Posts
    16
    Vote Rating
    5
      0  

    Default Configure CellEditing plugin using declarative syntax

    Hi,

    I get an error when trying to configure the cellEditing plugin this way:
    viewConfig: {
    plugins: {
    ptype: 'cellediting',
    clicksToEdit: 2
    }
    },


    But, it works if you configure it this way:
    plugins: [
    Ext.create('Ext.grid.plugin.CellEditing', {
    clicksToEdit: 1
    })
    ],

    You can find both examples in the following fiddle: https://fiddle.sencha.com/#fiddle/5u5

    Just comment / uncomment the code to run both scenarios.

    Thanks

  2. #2
    Sencha Premium User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,381
    Vote Rating
    1525
      0  

    Default

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

  3. #3
    Sencha Premium User evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    19,215
    Vote Rating
    1007
      0  

    Default

    The test case is misconfigured.

    2 things on the not working version:
    1) The plugin is configured in the viewConfig, it should be on the grid.
    2) The syntax should be an array of plugins.

    Code:
    Ext.create('Ext.grid.Panel', {
        title: 'Simpsons',
        store: Ext.data.StoreManager.lookup('simpsonsStore'),
        columns: [{
            header: 'Name',
            dataIndex: 'name',
            editor: 'textfield'
        }, {
            header: 'Email',
            dataIndex: 'email',
            flex: 1,
            editor: {
                xtype: 'textfield',
                allowBlank: false
            }
        }, {
            header: 'Phone',
            dataIndex: 'phone'
        }],
        selType: 'cellmodel',
    
    
    
        plugins: [{
            clicksToEdit: 1,
            ptype: 'cellediting'
        }],
    
        height: 200,
        width: 400,
        renderTo: Ext.getBody()
    });
    Works correctly.
    Twitter - @evantrimboli
    Former Sencha framework engineer, available for consulting.
    As of 2017-09-22 I am not employed by Sencha, all subsequent posts are my own and do not represent Sencha in any 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
  •