javascript - ExtJS复合字段在FF中不显示

标签 javascript extjs

我创建了一个字段集,它是表单的一部分,并且刚刚显示了 porpuse:

H_Info = Ext.extend ( Ext.form.FieldSet, {
  title:         'Origination Info',
  labelWidth:    1,

  initComponent : function ( ) {
    this.items = [ {
      xtype:       'displayfield',
      name:        'Name'
    }, {
      xtype:       'displayfield',
      name:        'Address'      
    }, {
      xtype:       'compositefield',            
      items:       [ {
        xtype:        'displayfield',
        name:         'OrgDate',
        width:        100       
      }, {
        xtype:        'displayfield',
        name:         'OrgValue',
        width:        120,
        flex:         1      
      } ]
    }, {
       xtype:    'displayfield',
       name:     'CurrentValue'      
    } ];

    H_Info.superclass.initComponent.call ( this );  

  } // initComponent 

} );

它按照 IE 6.0 中的预测工作,字段显示在预期的位置,但是当我在 FF 中尝试时,复合字段中分组的 2 个字段(OrgDate 和 OrgValue)不会显示。

知道我缺少什么吗?

最佳答案

Rob 建议在复合字段中添加默认值,如下所示:

      ....
      xtype:       'compositefield',
      defaults: {
          fieldLabel: ' ',
          labelSeparator: ' ',
          height: 12
      }, 
      ....

为其添加高度,这不是完美的解决方案,但它会覆盖高度并强制复合字段显示(显示)

关于javascript - ExtJS复合字段在FF中不显示,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4716287/

相关文章:

javascript - 将警报转换为 console.log

javascript - 使用 D3.js 的多面积图

ExtJS 4.1 : How to adjust column width to content in a grid?

javascript - ExtJS 的代码结构

javascript - ExtJs如何在一个 Controller 下创建和管理动态 View

javascript - 如何在 POPUP 中传递表行 ID

javascript - 在不停止应用程序的情况下拦截 400 Bad Request

javascript - Angular Material Moment.js 格式化

javascript - 为什么在使用 Ext.Function.defer (setTimeout) 时无法访问数组的值?

extjs - 使用同一个 Store 填充 2 个网格