Part of #1666 (CUSTOM custom views — phase 4).
Description
The custom-view controller exposes change/exec, and the classic controller has some helpers (e.g. specific view-filter helpers) that React lacks. Round out the controller surface and make React and classic expose the same set:
- apply filters and orders programmatically;
- get record count and column sums;
- run a report, and export the grid;
- expand / collapse tree nodes;
- switch list view mode; copy / paste;
- ensure
exec / eval / change and the view-filter helpers are reachable the same way in both React and classic.
DESIGN sales { salesBox { custom = 'SalesGrid'; } };
// API names illustrative — exact shape decided in implementation
function SalesGrid({ data, controller }) {
return <>
<button onClick={() => controller.setFilter(/* … */)}>Filter</button>
<button onClick={() => controller.runReport()}>Report</button>
<button onClick={() => controller.exportGrid('xlsx')}>Export</button>
<div>Total: {/* controller.calculateSum(...) */}</div>
</>;
}
Reason
React custom views can't filter, sort, total, report or export through the form today, and the React and classic controllers diverge, so a component is not portable between them. Exposing these interactive-safe operations consistently makes custom views first-class.
Part of #1666 (CUSTOM custom views — phase 4).
Description
The custom-view
controllerexposes change/exec, and the classic controller has some helpers (e.g. specific view-filter helpers) that React lacks. Round out the controller surface and make React and classic expose the same set:exec/eval/changeand the view-filter helpers are reachable the same way in both React and classic.Reason
React custom views can't filter, sort, total, report or export through the form today, and the React and classic controllers diverge, so a component is not portable between them. Exposing these interactive-safe operations consistently makes custom views first-class.