Open jmauzyk opened 1 year ago
By default, the width of table cells will be split evenly over the parent container. Are you sure there's no conflicting CSS on your site that would make the table cells not stretch the full width (50/50 in your example)?
As for the width value, that's unit-less so you can have control over things. You'll want to probably use 50px
or 50%
to produce <th width="50px" data-handle="column1" data-type="singleline">Column 1</th>
You'll also likely want to add .fui-table { table-layout: fixed; }
to make that work.
I see, I didn't realize units were required and for some reason my brain assumed it corresponded to the input size
attribute. Might be worth putting a mention of this in the documentation.
Is it possible to style the inputs within the table? I tried adding the following to our theme config, but it didn't have any effect on the inputs.
'table' => [
'fieldAddButton' => [
'attributes' => [
'class' => 'info-button'
]
],
'fieldInput' => [
'attributes' => [
'class' => 'pure-input-1'
]
]
],
Nah, it won't be the input size
attribute, because a table cell can have other things, other than a text input for example.
As for styling fields within Table cells, you're right that's not quite supported yet as I haven't figured out a good way to model that.
Describe the bug
Changing the width configuration for a column of a table field appears to have little to no effect. Here is an example with no width setting:
Here is the table field with the column widths set to 50 and 5:
The columns no longer split the container width evenly, but the column widths don't seem to correspond to the width settings.
Steps to reproduce
Form settings
Craft CMS version
4.4.16.1
Plugin version
2.0.33
Multi-site?
Yes
Additional context
No response