1

Appsdk2 rc2 は、rallygrids の columnCfgs の width パラメータを無視しているようです。

例えば:

xtype: 'rallygrid',
columnCfgs: [
    {dataIndex: 'ValueScore', width: 40, text:'Value'}
]

これは、rc1 では 40 ピクセル幅でレンダリングされますが、rc2 ではレンダリングされません。これはバグですか、それともパラメータが変更されましたか? これに対する解決策はありますか?

4

2 に答える 2

1

これは 2.0rc2 リリースのバグです。今のところ、列構成に flex: null を含めて、グリッドが誤って実行していることをオーバーライドすることで回避できます。

xtype: 'rallygrid',
columnCfgs: [
    {dataIndex: 'ValueScore', width: 40, text:'Value', flex: null}
]

不具合が報告されました。これは次のリリースで修正される必要があります。

于 2014-01-08T20:25:41.347 に答える
1

このバグは、カスタム ストアに基づくグリッドには影響しないようです。clumnCfgsで指定された幅が期待される効果を持つRally.data.custom.Storeを使用した rc2 アプリ (ここに完全なコードが表示される場合があります) を次に示します。

  _createTestSetGrid: function(testsets) {
        var testSetStore = Ext.create('Rally.data.custom.Store', {
                data: testsets,
                pageSize: 100,  
            });
        if (!this.down('#testsetgrid')) {
         this.grid = this.add({
            xtype: 'rallygrid',
            itemId: 'testsetgrid',
            store: testSetStore,
            columnCfgs: [
                {
                   text: 'Formatted ID', dataIndex: 'FormattedID', xtype: 'templatecolumn',
                    tpl: Ext.create('Rally.ui.renderer.template.FormattedIDTemplate')
                },
                {
                    text: 'Test Case Count', dataIndex: 'TestCaseCount',
                },
                {
                    text: 'Test Case Status', dataIndex: 'TestCaseStatus', width: 200,           //width: 40
                },
                {
                    text: 'TestCases', dataIndex: 'TestCases', 
                    renderer: function(value) {
                        var html = [];
                        Ext.Array.each(value, function(testcase){
                            html.push('<a href="' + Rally.nav.Manager.getDetailUrl(testcase) + '">' + testcase.FormattedID + '</a>')
                        });
                        return html.join(', ');
                    }
                }
            ]
        });
         }else{
            this.grid.reconfigure(testSetStore);
         }
    }

幅を 200 に設定すると、TestCasesStatus 列は次のようになります。

ここに画像の説明を入力

次のように幅を 40 に設定します。

ここに画像の説明を入力

于 2014-01-08T20:25:57.333 に答える