extjswidgettagfield

Tagfield does not work properly when hiding a widgetСolumn


I have a grid with windegColumns. And it all works right. But if you manually hide the Num column, the tagfild widget does not work correctly. New values are not set, old values are not deleted. Unsaved values are reset. In my application, I need to dynamically hide or show the column containing the widget at the click of a button. But when I do this, my Tagfield breaks

My fiddle: https://fiddle.sencha.com/#view/editor&fiddle/3db6

Just hide the Num column in the table and try to change the Tegfield value and you will see

Any idea why this is happening and how to fix it?


Solution

  • It looks like there might be a bug with using the dataIndex instead of bind. Per the docs, you get a record property for each row for free, and if it doesn't work, you may have to explicitly set a rowViewModel. I would recommend using binding here regardless:

    xtype: 'widgetcolumn',
    cellWrap: true,
    text: 'Phone',
    // Notice I took out the dataIndex here
    flex: 1,
    widget: {
        xtype: 'tagfield',
        // Added bind
        bind: {
            value: '{record.phone}'
        },
        // rest of code