TMP_InputField's scrollbar doesn't update when changing text programmatically

I have a TMP_InputField with a vertical scrollbar and when I change the text programmatically (setting the InputField’s text property) the position or size of the scrollbar doesn’t update. I’ve tried several different things with no luck, such as

  • Rebuilding the layout
  • ForceMeshUpdate on the textComponent
  • ForceLabelUpdate
  • TMPro_EventManager.ON_TEXT_CHANGED

I never figured out this as well, I’ve always manually created a scrollview with a ContentSizeFitter and such. more setup initially, but less headaches, as you can create a generic prefab out if it and reuse it everywhere