2016-09-28 52 views
1

我有這樣一些列的劍道格:標題文本

columns: [ 
    { 
     title: 'Test', 
     field: 'SomeField', 
     width: '200px' 
    }, 
    { 
     title: 'Extra long example title', 
     field: 'SomeOtherField', 
     width: '100px', 
     headerAttributes: { style: "white-space: normal" } 
    }, 
    ... 
] 

我的長標題被包裹沒有任何問題。但是,這並不需要得到每個包裹短列標題,顯示在標題中這樣的底部:

+------------+------------+ 
|   | Extra long | 
|   | example | 
| Test  | title  | 
+------------+------------+ 

不過,我想有標題在這樣的報頭的開頭:

+------------+------------+ 
| Test  | Extra long | 
|   | example | 
|   | title  | 
+------------+------------+ 

我嘗試添加headerAttributes: { style: "margin-top: 0" }到第一列,但它並沒有改變任何東西。我怎麼能做到這一點?

+2

vertical-align:top? – ArtemKh

+1

@ArtemKh Omg是的,沒想到那... –

+1

@ArtemKh請張貼它作爲答案得到代表。 –

回答

0

ArtemKh的評論是解決我的問題。我只需將vertical-align: top添加到我的headerAttributes即可在單元格頂部顯示標題。