2016-10-04 55 views

回答

0

我找到了解決這個通過這個幹鍋: https://jsfiddle.net/inillie/m374gnxd/

var TestTable = React.createClass({ 
    getInitialState: function() { 
    return { 
     test: [{ 
     firstName: "Foo", 
     lastName: "Bar", 
     userId: "foo", 
     someStuff: "SCIEN" 
     }] 
    }; 
    }, 
    render: function() { 
    return (<div> 
     < Griddle results = { 
     this.state.test 
     } 
     columnMetadata = { 
     columnMeta 
     } 
     columns = { 
     ['firstName', 'lastName', 'someStuff'] 
     } 
     /> < /div> 
    ); 
    } 
}); 

基本上,你可以使用自定義屬性稱爲列的幹鍋渲染內以確保顯示的列。

相關問題