Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Column order not maintained for columns with custom renderers not mapped to a real dataIndex #188

Open
LaurieSReynolds opened this issue Oct 2, 2017 · 1 comment

Comments

@LaurieSReynolds
Copy link

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
}
]
@bencripps
Copy link
Owner

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants