Filter Components
Filter controls, filter bars, and search filters
Components for filtering and searching data.
Prerequisites
- Complete the installation
- Import styles:
import '@tetherto/mdk-react-devkit/styles.css'
Components
ListViewFilter
Toolbar of dropdown/checkbox filters that drive a list view; emits the active filter set to the parent.
agent-ready
Props
| Prop | Type | Required | Default | Description |
|---|---|---|---|---|
options | CascaderOption[] | ✓ | - | Cascader options for filtering |
filterKey | string | undefined | - | Optional key to force re-mounting the Cascader when filters change Useful if you want to reset the internal state of th… | |
localFilters | LocalFilters | undefined | - | Current filter values as key-value pairs Example: { type: 'Antminer S19XP H', status: ['active', 'pending'] } | |
onChange | (selections: CascaderValue[]) => void | ✓ | - | Callback when filters change |
className | string | undefined | - | Custom className for the filter button |
ReportTimeFrameSelector
Reporting-period selector with preset windows (7d / 30d / month-to-date / custom range).
agent-ready
Props
| Prop | Type | Required | Default | Description |
|---|---|---|---|---|
dateRange | [Date, Date] | ✓ | - | - |
presetTimeFrame | number | null | ✓ | - | - |
setPresetTimeFrame | (value: number | null) => void | ✓ | - | - |
setDateRange | (value: [Date, Date]) => void | ✓ | - | - |
TimeframeControls
Date-range picker for financial reporting pages — supports year, month, and week granularity via connected selects.
agent-ready
Props
| Prop | Type | Required | Default | Description |
|---|---|---|---|---|
hint | string | - | - | |
onReset | VoidFunction | - | - | |
showResetButton | boolean | - | - | |
isWeekSelectVisible | boolean | - | - | |
isMonthSelectVisible | boolean | - | - | |
layout | "horizontal" | "stacked" | - | - | |
dateRange | TimeframeControlsDateRange | - | - | |
timeframeType | TimeframeTypeValue | null | - | - | |
onRangeChange | TimeframeControlsOnRangeChange | - | - | |
onTimeframeTypeChange | (type: TimeframeTypeValue) => void | - | - |
TimeframeWeekFlatContent
Flat list of selectable week items for the TimeframeControls week selector.
agent-ready
Props
| Prop | Type | Required | Default | Description |
|---|---|---|---|---|
visibleWeeks | Week[] | ✓ | - | - |
TimeframeWeekTreeContent
Hierarchical year → month → week tree for the TimeframeControls week selector.
agent-ready
Props
| Prop | Type | Required | Default | Description |
|---|---|---|---|---|
timezone | string | ✓ | - | - |
selectedYear | number | ✓ | - | - |
selectedMonth | number | ✓ | - | - |