-
Notifications
You must be signed in to change notification settings - Fork 429
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
How to set column width? #226
Comments
This is not implemented yet. I will enhance this feature ASAP, thanks. |
@AllenFang Trying to convert to your new version. Ran into this same issue - pretty much blocking us at this point. I was able to use headerStyle to set the width for now. Maybe that is the new way? |
@waynebrantley right now, |
I think current implementation if great! Just add to your column description and done.
|
@AllenFang so is headerStyle going to be how this is done? That is fine, might should put a storybook showing? |
can anyone suggest a way to 'width - auto' size the columns according to the data? |
<BootstrapTable....> |
Is there an example of how to set the column widths? This is fundamental functionality... |
@pceccato See @Northshoot comment above...that is part of the column definition...works good. |
Does it need to be an arrow function? |
No, you could use anonymous function declaration. Or any other you may like. |
Hi. I'm just starting to use the component, but the proposed does not work if we want the table to be responsive. |
how to set width in react-bootstrap-table2 Its not working... |
Try adding 60px instead.
That should work, but then the table loses its responsive behavior.
…On Sun, Jan 6, 2019 at 9:19 AM Ethasham Nasir ***@***.***> wrote:
how to set width in react-bootstrap-table2
let columns = [ { dataField: 'lastModified', text: 'Last Modified Date',
width: "60" }, ]
Its not working...
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#226 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AJIgLu9-XTfSVcTzGq7Rqs7tEMTzTwQWks5vAgYNgaJpZM4SQUTB>
.
|
Response is above: #226 (comment) |
It works |
Hi, |
Hello, Same problem how to set column width? Thanks |
@Maneeshachandran and @Shannibrst ... can you share a few code snippets? |
@lovato I need to increase the width of the first column. So I have used the style. But it is not working. |
@Maneeshachandran have you tried previous responses? That worked for me, and it is different from your approach.
|
@lovato Hi Lovato.. It is working for a simple table. Whereas in my case, I need to implement it for a large table. I have vertical and horizontal scroll bars for the table. For this table, I cannot able to fix the column width. |
@Maneeshachandran Sorry, but w/o code for this "large table", I can't understand the problem. I am using it across two projects, different table sizes, several tables, and everything is running smooth. |
I just followed this reference and it worked for me react-bootstrap-table2 storybook Work on Header Columns - Customize Column Style |
.react-bootstrap-table th[data-row-selection] { |
css
Table Rows Options: |
I have no doubt that all of these solutions work flawlessly, however I am hiding the header row:
and due to this none of the proposed solutions are working. I can even see the classes being applied using Chrome Dev Tools. The issue, for me, is the default style applied to the wrapper class:
Using dev tools, if I remove that class, the table width adopts the values of the width parameters passes via to BS Tables. I need away to remove this class via the library. I have tried passing in null and a blank string to no avail. Thank You. |
is this going to be done (been about a year now) or just hacked? |
@AllenFang @YannisMarios |
Add the bootstrap4 property and the header overrides I meantion above take effect. |
hello there,
with the help of this code I'm able to manage table header column size but not table cells size. Thanks. |
Try it: |
It's really working. Thank you so much @AlexPuga |
Hi I am trying React-bootstrap-table. But i wanted to increase the width of header row. How can i do that? |
Thanks |
Try this. |
Hi there, Thanks in advance |
if nothing works, try this one. Worked for me. Cheers! |
Hi,
I am trying to set the column width? How do you do It with react-bootstrap-table2?
The text was updated successfully, but these errors were encountered: