I have split it into one more component, and now it works.
I think there’s a bug inside the first component, and I will keep it that way, so I’m going to stick with this approach.
In my case, splitting into one more component works better for the end user.