diff --git a/docs/adr/0004-signalr-datasource-server-side-filtering.md b/docs/adr/0004-signalr-datasource-server-side-filtering.md index d7ac0a8..defbed4 100644 --- a/docs/adr/0004-signalr-datasource-server-side-filtering.md +++ b/docs/adr/0004-signalr-datasource-server-side-filtering.md @@ -58,9 +58,9 @@ Adopt a **criteria-string** server-side filter for the SignalR DataSource. The D **Follow-ups required:** - File SIGDS + GRID TODO entries: `[SignalRFilterText]` attribute + hub injection + **mismatch warning-log** (AyCode.Services.Server); `SignalParams.FilterText` field (AyCode.Services); filter-service + per-entity whitelist (AyCode.Services.Server); MgGrid `FilterMode` (Local / Server) + criteria serialization into `SignalParams.FilterText` on `Server` (AyCode.Blazor); add `DevExpress.Data` to the server plugin. -- **Enabled extension** (own follow-up, not core to this ADR): MgGrid declarative **quick-filter templates** — field-bound `DxTagBox` (or similar) slots in the grid container that auto-populate from distinct values, produce a `CriteriaOperator` merged into the grid filter, and ride the same `FilterMode` path. Needs a server distinct-values source under `FilterMode.Server` (see v2 paging). +- **Enabled extension** (own follow-up, not core to this ADR): MgGrid declarative **quick-filter panel** — a `FilterPanel` slot on `MgGridBase` hosting `MgTagBox` (`: DxTagBox` seam) controls, each with a `FieldName` (consistent with grid columns / DevExpress `FieldName`). On selection each control calls `DxGrid.SetFieldFilterCriteria(FieldName, criteria)`; DevExpress **AND-combines the per-field criteria automatically** (+ the user's filter row) — no manual aggregation, no clobber (**NOT** `SetFilterCriteria`, which replaces the whole filter). Planned types: `MgGridFilterPanelBase` (framework, holds the grid-cascade + wiring) → `GridFilterPanel` (project seam, typically empty), plus the `MgTagBox` seam. The grid's `FilterCriteria` is the single source: locally it filters the bound `Data`; under `FilterMode.Server` the same `FilterCriteria` reaches `GridCustomDataSource.GetItemsAsync(options.FilterCriteria)` → the criteria-string path — so the component is built **once** for both. Needs a server distinct-values source under `FilterMode.Server` (see v2 paging). - Verify: `DevExpress.Data` version matching the client DevExpress Blazor major; license coverage on the server package feed; linq2db translation of `CriteriaToExpressionConverter` output (function whitelist). -- **Quick-search (`SearchText`) — open / questionable point:** DevExpress `SearchText` (the search box above the grid) is a **separate feature** from `FilterCriteria`, currently filtering locally over the bound in-memory `Data`. Whether DevExpress folds it into `GridCustomDataSourceItemsOptions.FilterCriteria` (→ search rides the criteria-string path for free) or needs a thin `SearchText → OR-Contains criteria` adapter over searchable columns is **unverified** — confirm at implementation. Same whitelist / DoS caveats apply (search = OR-Contains across many columns). +- **Quick-search (`SearchText`) — confirmed SEPARATE from `FilterCriteria`.** Per DevExpress docs (Filter API): *"Search settings do not affect the applied filter criteria"* — `SearchText` filters in parallel, NOT folded into `FilterCriteria`. So server-side search does **not** ride the criteria-string path for free; it needs its **own** handling: a thin `SearchText → OR-Contains criteria` adapter over searchable columns (then it rides the same channel), or a separate search field. Same whitelist / DoS caveats apply (search = OR-Contains across many columns). - AyCode.Blazor cross-ref: no `docs/adr/` folder there yet → note in MGGRID docs or a future AyCode.Blazor ADR. - v2 paging ADR (`skip`/`take`/`count` + `{items,total}` envelope) when large-list pressure requires it. - `AyCode.Core/docs/adr/README.md` index row for 0004.