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

Set columns width #3

Closed
jungrafael opened this issue Feb 2, 2018 · 3 comments
Closed

Set columns width #3

jungrafael opened this issue Feb 2, 2018 · 3 comments

Comments

@jungrafael
Copy link

jungrafael commented Feb 2, 2018

Issue

Would it be possible to have per column the option to set its width?
That could be an option passed together with the columns array.

Your Environment

Tech Version
mui-datatables 1.0.7
node 8.7.0
OS Ubuntu 17.10
@gregnb
Copy link
Owner

gregnb commented Feb 2, 2018

Changing the columns data to be an array of objects is something I've been thinking about. I started this project to make it as easy as possible to get going. One idea I have is this package could accept two forms of columns.

Option 1:

const columns = ["Name", "Company", "City", "State"];

Option 2 (if you need more flexibility):

const columns = [
  { 
     name: "name", 
     options: { whateverOptions }  
  }
  ...
];

@jungrafael
Copy link
Author

That would be perfect! Exactly this structure I also thought would make sense and would even be backwards compatible :)

@gregnb gregnb mentioned this issue Mar 12, 2018
@gregnb
Copy link
Owner

gregnb commented Mar 29, 2018

Hey @jungrafael so I've refactored this package to correctly use mui themes and no longer take in options with my own styling system. That was done so it could align properly with material-ui and not having me roll my own solutions. Because of that, I'm not going to provide per component basis styling. You'll only be able to provide a theme which will affect all or none

@gregnb gregnb closed this as completed Mar 29, 2018
wdh2100 pushed a commit that referenced this issue Oct 25, 2021
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