Column definition from json file
I am using react-table version ^7.0.0-rc.9. I have json files that describe the columns for each of my different tables.
Table1Columns.json contains
// Example Column definition
{
"Header": "Column 1 name",
"accessor": "column_1_name",
}
I fetch the column data from the json files.
The fields "Header" and "accessor" work fine and my columns contain the correct header and data but when I try to set any other fields in the column definition like "width" or "filterable". The "width" and "filterable" fields are ignored.
Table1Columns.json contains
// Example Column definition
{
"Header": "Column 1 name",
"accessor": "column_1_name",
"filterable": "false",
"width": "50"
}
What might I be doing wrong?
I figured out my issue. Once I added useBlockLayout I was able to get the "width" field to work. And for the "filterable", I needed to use "Filter" and "filter".