Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/89.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 在IE中,从Ext.form.FieldSet中删除项会导致字段集展开_Javascript_Html_Internet Explorer_Extjs - Fatal编程技术网

Javascript 在IE中,从Ext.form.FieldSet中删除项会导致字段集展开

Javascript 在IE中,从Ext.form.FieldSet中删除项会导致字段集展开,javascript,html,internet-explorer,extjs,Javascript,Html,Internet Explorer,Extjs,我有一个ExtJS项目,其中有一个字段集,我需要从中动态删除项并替换为不同的项 但是,当我删除项然后添加新项时,字段集每次都会略微扩展,因此整个字段集会不断增长 这只发生在IE中,而不是Firefox或Chrome 这是我的字段集 var lonFields = new Ext.form.FieldSet({ ref: '../../setLonFieldSet', layout: { type: 'table',

我有一个ExtJS项目,其中有一个字段集,我需要从中动态删除项并替换为不同的项

但是,当我删除项然后添加新项时,字段集每次都会略微扩展,因此整个字段集会不断增长

这只发生在IE中,而不是Firefox或Chrome

这是我的字段集

var lonFields = new Ext.form.FieldSet({
        ref: '../../setLonFieldSet',
        layout: {
            type: 'table',
            columns: 2
        }
});
这里是我引用它的地方,删除所有内容,然后添加新内容

Ext.getCmp('maintainGeneratorsBatteriesViewport').setLonFieldSet.removeAll();
Ext.getCmp('maintainGeneratorsBatteriesViewport').setLonFieldSet.add(
                {html: "<b>Default Lon:</b>"}   
            );
Ext.getCmp('maintainGeneratorsBatteriesViewport').setLonFieldSet.add(
                {html: "<b>Default Lon:</b>"}   
            );
Ext.getCmp('MaintaintGeneratorsBatteriesViewport').setLonFieldSet.removeAll();
Ext.getCmp('MaintaintGeneratorsBatteriesViewport')。setLonFieldSet.add(
{html:“默认Lon:”}
);
Ext.getCmp('MaintaintGeneratorsBatteriesViewport')。setLonFieldSet.add(
{html:“默认Lon:”}
);
正如我所说,在IE中,这会导致整个字段集每次都增加高度

有什么建议吗

提前感谢,, 蒂姆

试试这个:

var fieldSet=Ext.getCmp(“您的字段集id”);
fieldSet.removeAll(fieldSet.items);

fieldSet.doLayout()