react-redux-grid
react-redux-grid copied to clipboard
Column order not maintained for columns with custom renderers not mapped to a real dataIndex
Version: 5.4.2 Browser: Chrome OS: macOS Sierra 10.12.16
Columns not mapped to a real dataIndex are appearing out of order. In the example below, the menu column should be the last column displayed, but instead it is the first column. If the column dataIndex does map the data, the column order is maintained.
QUESTION: Is there some other way to specify the column order besides the order in the array?
columns: [
{
name: "Name",
dateIndex: "name"
},
{
name: "email",
dataIndex: "email"
},
{
name: "Menu",
dataIndex: "menu" <----- no menu in the data
renderer: {
// show a menu icon
}
}
]
data [
{
name: Jane,
email: [email protected],
id: 1
},
{
name: Rahul,
email: [email protected],
id: 2
}
]
Right now the only way to configure the order of columns is to pass them in the order you'd like them displayed. However, that the menu column is being displayed first is a bug -- we should fix this!