Skip to content

CUSTOM custom views: container collapse/active state, and correct data for collapsed/inactive-tab views #1673

@AlexKirkouski

Description

@AlexKirkouski

Part of #1666 (CUSTOM custom views — phase 4).

Description

Two related parts:

  1. 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.
  2. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions