When I input values into a wix table they some times run over and the row does not automatically increase in height to fit the text. Given that some rows contain hardly anything and others contain a lot I do not want to have massive rows with barely anything in them. Is there a way to get the table to adjust each row’s height?
You can’t set the table height for each row or cell by code, you can only do the columns width by code.
https://www.wix.com/corvid/reference/$w.Table.html#Column
Hi, GOS! Would you tell me how to write the code to make the row or cell’s height responsive to the size of the text into a table? I opened this page that you forwarded but I’m having a hard time to understand how to write the code… Could you help me?
Well GOS is a member who is not active anymore since few years.
Next time you should better open your won post, with your own issue, instead of bumping up an old one.
Well as GOS already said, you are just able to set the width of a column. How to do, take a look onto the following example…
Set the list of columns for a table
$w("#myTable").columns = [
{
"id": "col1",
"dataPath": "field1",
"label": "Field 1",
"width": 100,
"visible": true,
"type": "string",
"linkPath": "link-field-or-property"
},
{
"id": "col2",
"dataPath": "field2",
"label": "Field 2",
"width": 100,
"visible": true,
"type": "image",
"linkPath": "link-field-or-property"
},
{
"id": "col3",
"dataPath": "field3",
"label": "Field 3",
"width": 100,
"visible": true,
"type": "number",
"linkPath": "link-field-or-property"
}
];