Skip to content

CUSTOM REACT: project the full property presentation (captions, read-only, colors, classes, images, sums) #1670

@AlexKirkouski

Description

@AlexKirkouski

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

Description

A React custom container (custom = 'Component') today receives only property values. Extend the projected state with the same per-property/-cell presentation the platform already computes for native rendering:

  • dynamic captions;
  • read-only / disabled state;
  • background and foreground colors;
  • images;
  • CSS classes (grid / value / caption);
  • custom options, row selection and row colors;
  • record count and column sums (footer).

The classic CUSTOM controller already exposes most of these through getters, so this is primarily about the React projection — and, where it makes sense, aligning the shape with the classic surface. It can land incrementally — one aspect at a time (e.g. read-only, then colors, then captions).

DESIGN myForm {
    dataBox { custom = 'MyGrid'; }   // MyGrid gets values today; it should also receive
}                                     // caption / read-only / colors / sums / etc.
// illustrative projected shape
function MyGrid({ data }) {
  return data.line.list.map(r =>
    <input key={r.value} value={r.qty} readOnly={/* r.qty readonly flag */}
           style={{ background: /* r.qty background */ }} />);
}

Reason

With values only, a React component can show raw data but cannot reflect read-only cells, conditional formatting (colors/classes), dynamic captions, totals/counts, or selection. Exposing the same presentation state the native grid uses closes the main gap between a React custom view and a natively rendered form, and brings it in line with the classic custom view.

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