How to hide layout if the element is getting hidden using rules

using react and vanilla-renderers I have created custom HorizontalLayout, VerticalLayout and CustomInputControl and its good until that but after applying rules to control and when the element is hidden the layout takes space because of which there is a white space how can I remove or handle the layout to be hidden if the element is hidden.

I am using jsonforms/core 3.1.0 and jsonforms/react 3.1.0

Hi @indersj,

The layout is fully controlled via the CSS you apply. So if you’re already using custom layout and input renderers, then you can adapt the rendered output in any way you need.

For example if you’re using flex box for layouting, then you could render the grid items as part of the custom input controls. In that case the grid item will not be rendered at all when it’s not visible and the layout will behave as you expect.