set submitValue:false for extjs component

107 Views Asked by At

I have component filled in runtime as part of my form:

initComponent() {
    const me = this;
    Ext.apply(me, {
        items: [
            {
                xtype: 'container',
                name: 'BasicIndicatorsContainer',
                // need for recursive submitValue: false
                items: [
                    // controller forms some 32 grids here
                ]
            },

When I submit form it generates millions of fields in form data.

How do I made form.getValues () ignore my subcomponents during form.getValues () ?

1

There are 1 best solutions below

1
Peter Koltai On

You can try to use the defaults configuration of Ext.container.Container. The configs you set here will be applied to every item in the container.

So if the items are form fields, you can set all of their submitValue once by applying this on the container:

xtype: 'container',
name: 'BasicIndicatorsContainer',
defaults: {
  submitValue: false,
}

Actually you can also specify a function here to implement more complex behaviour.