You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 9bd1cb5
Browse filesBrowse the repository at this point in the historyBrowse files
|`EnableColumnReordering`|`bool`| Enables reorder handles; disabled by default |
107
114
|`InitialColumnLayout`|`IReadOnlyList<FancyColumnLayout>?`| Initial order and optional widths, applied once per component instance |
108
115
|`ColumnLayoutChanged`|`EventCallback<IReadOnlyList<FancyColumnLayout>>`| Raised with the complete normalized layout after a resize or reorder |
116
+
|`InitialColumnFilters`|`IReadOnlyList<FancyColumnFilter>?`| Initial column filters, applied once per component instance; entries for unknown or non-`Filterable` columns are ignored |
117
+
|`ColumnFiltersChanged`|`EventCallback<IReadOnlyList<FancyColumnFilter>>`| Raised with the complete list of active filters after a filter is applied or cleared |
The column filter popup adds these keys (English defaults): `FilterColumnFormat` ("Filter column {0}"), `FilterValuePlaceholder`, `ApplyFilterLabel`, `ClearFilterLabel`, and one label per operator: `FilterOperatorEqualsLabel`, `FilterOperatorNotEqualsLabel`, `FilterOperatorContainsLabel`, `FilterOperatorNotContainsLabel`, `FilterOperatorStartsWithLabel`, `FilterOperatorEndsWithLabel`, `FilterOperatorIsEmptyLabel`, `FilterOperatorIsNotEmptyLabel`.
213
+
203
214
The package also includes `FancyTable.resx`, `FancyTable.en.resx`, and `FancyTable.de.resx` so the same string catalog is already available for a future resource-driven integration layer.
204
215
205
216
## Column Configuration
@@ -213,6 +224,7 @@ Each column is configured using `FancyColumn<TItem>`:
213
224
|`Sortable`|`bool`| Whether the column can be sorted |
214
225
|`Searchable`|`bool`| Whether the column is included in search (default: `true`) |
215
226
|`Hideable`|`bool`| Whether the column can be hidden by the user |
227
+
|`Filterable`|`bool`| Whether the header shows a filter popup for this column (default: `false`) |
216
228
|`Resizable`|`bool`| Whether the column can be resized when resizing is enabled (default: `true`) |
217
229
|`Reorderable`|`bool`| Whether the column can be reordered when reordering is enabled (default: `true`) |
218
230
|`Width`|`double?`| Initial width in pixels; natural content width is used when omitted |
@@ -248,6 +260,36 @@ Columns without `Width` or `MaxWidth` initially follow the currently rendered co
248
260
249
261
The first declared column of `FancyTreeTable` remains visible and fixed at the left while reordering is enabled. Non-reorderable columns act as boundaries that other columns cannot cross. Hidden columns retain their saved position and width.
250
262
263
+
### Column filters
264
+
265
+
Mark columns with `Filterable = true`. The host persists the filters; the component stores nothing itself. This example uses `localStorage` through `JSRuntime`:
`InitialColumnFilters` is applied once, so load the saved list before the table first renders. `localStorage` is not available during prerendering; in that case load it in `OnAfterRenderAsync` and render the table afterwards.
292
+
251
293
## Setup
252
294
253
295
To use `SoPro.FancyTable` in your Blazor application, include Bootstrap CSS and Bootstrap Icons in your app (`App.razor` / host page):
@@ -555,6 +597,7 @@ Global expand/collapse actions always operate on the full tree, not just on the
0 commit comments