Part of #1666 (CUSTOM custom views — phase 4).
Description
Two related parts:
- Expose container layout state — let a custom view read and drive collapsible-container collapse and tabbed-container active-tab state through the controller, so a custom component can coordinate with the surrounding layout.
- Fix a correctness issue — when a custom view is placed inside a collapsible container or a tab, and that container is collapsed or its tab is inactive, the custom view must still show correct data: today it can display stale or empty values. The required contract: a custom view either receives current data, or is told it is hidden and renders accordingly.
DESIGN order {
detailsBox { collapsible = TRUE; lines { custom = 'OrderLines'; } }
}
// API names illustrative
function OrderLines({ data, controller }) {
// read/drive surrounding collapse from a custom control
return <button onClick={() => controller.setCollapsed('detailsBox', true)}>Hide</button>;
}
Reason
Custom views placed inside collapsible or tabbed layouts can display wrong/old data when their container is collapsed or its tab is inactive, and they have no way to react to or control collapse. Fixing the data contract and exposing the state makes custom views correct inside normal lsFusion layouts.
Part of #1666 (CUSTOM custom views — phase 4).
Description
Two related parts:
Reason
Custom views placed inside collapsible or tabbed layouts can display wrong/old data when their container is collapsed or its tab is inactive, and they have no way to react to or control collapse. Fixing the data contract and exposing the state makes custom views correct inside normal lsFusion layouts.