EccWidget
EccWidget is a dashboard tile with title, reload button and auto-refresh. You provide a loader and render the result.
TSX
import { EccWidget } from "@/ecc/components/widgets/EccWidget";
import { fetchProcessWidgetCount } from "@/ecc/services/ApiService";
<EccWidget title="Open requests" loader={fetchProcessWidgetCount} refreshInterval={60_000}>
{(counts) => (
<div>
<EccNumber fieldLabel="Active" value={counts.totalActive} />
<EccNumber fieldLabel="Overdue" value={counts.totalOverdue} />
</div>
)}
</EccWidget>
The example renders the counts with EccNumber; the data is an EccProcessWidget object.
Props
Prop
Type
Default
Description
|
| - | title |
|
| - | loads the data - on mount, on reload and on refresh; it should not redirect on errors |
|
| - | renders the data, only when data is available |
|
| 2 minutes |
|
|
| - | styling |
Loading and error states are handled by the widget.
Related
Page
Relation
sub widget: a ready-made EccWidget | |
where tiles are placed |
Was this section helpful?
On this page
- EccWidget