Ui not updating correctly

The panel does not re-scale correctly (using content size fitter). To explain my problem, here are some pictures.


  1. The panel object is yet how it is at first.



2. Then, when I add an object, it does not rescale, despite the fact that the presets component overflows.



3. But, strangely, it does when I add an other one…



4. Here are the settings of the presets object in case it is needed.

I just don’t understand why the panel isn’t re-scaling at the first time…
Is there a parameter I missed ?

Thanks for your help.

I fixed it by using

LayoutRebuilder.ForceRebuildLayoutImmediate(panel);

But honestly, I don’t think that is the best way to do it, so only temporary…