Hello,
I’m trying to create a grid with a column which renders a custom web-component which is implemented in vaadin flow as LitTemplate. This component uses a Lit template with a slot, where some additional components can be passed.
The component itself works correctly, but when I try to use it inside a grid column (with a component renderer) and let the grid calculate the column’s width automatically, it does not seem to work correctly.
The reason seems to be, that although the component from the template is created correctly and other components are added to the slot, the LitElement initializes the shadow DOM “asynchronously” outside the event loop, but the column width recalculation is triggered before the template rendering is finished, which means that it does not calculate correct width for the column.
Do you have any hints how to solve this without some excessive javascript hooks or resize observers?
Thank you