![image](https://github.com/bloomberg/ipydatagrid/assets/79875276/b6635f0f-af31-4f4c-9c26-5c55a69f7c48)
2. Then run the following to update the data:
```python
df = pd.DataFrame([{"An Important Title": 1, "Another Title": 2}])
grid.data = df
We see that the columns are no longer autofitting even though it is set to True.
Expected behavior
Expect that new data is set and the columns are autofit e.g. for the example above I expect to see:
Environment (please complete the following information):
Operating System and Version: Ubuntu Linux 20.04
Browser [e.g. Firefox, Safari] (if applicable): Google Chrome Version 117.0.5938.132 (Official Build) (64-bit)
Additional context
If display(grid) is executed again then it seems to sort itself out as expected:
Describe the bug When setting data with
auto_fit_columns
set to True, the columns do not autofit.To Reproduce Steps to reproduce the behavior:
df = pd.DataFrame([{"An Important Title": 1}])
grid = DataGrid(df, auto_fit_columns=True, layout={"height": "50px"}) display(grid)
Expected behavior Expect that new data is set and the columns are autofit e.g. for the example above I expect to see:
Environment (please complete the following information):
Additional context If
display(grid)
is executed again then it seems to sort itself out as expected: