Class FilterDefinition<T>
- Namespace
- MudBlazor
- Assembly
- MudBlazor.dll
Represents the logic of a filter applied to MudGrid data.
public class FilterDefinition<T> : IFilterDefinition<T>
Type Parameters
T
The type of object being filtered.
- Inheritance
-
FilterDefinition<T>
- Implements
- Inherited Members
- Extension Methods
Constructors
FilterDefinition()
public FilterDefinition()
Properties
Column
The column for which this filter applies.
public Column<T>? Column { get; set; }
Property Value
- Column<T>
FieldType
The type of column being filtered.
public FieldType FieldType { get; }
Property Value
FilterFunction
The function which performs the filter.
public Func<T, bool>? FilterFunction { get; set; }
Property Value
Id
The unique ID of this filter.
public Guid Id { get; set; }
Property Value
Operator
The kind of equality comparison to perform on values.
public string? Operator { get; set; }
Property Value
Remarks
Values typically come from FilterOperator depending on the data type:
FilterOperator.Boolean | Operators for bool column types. |
FilterOperator.DateTime | Operators for DateTime column types. |
FilterOperator.Enum | Operators for Enum column types. |
FilterOperator.Guid | Operators for Guid column types. |
FilterOperator.Number | Operators for numeric column types. |
FilterOperator.String | Operators for string column types. |
Title
The name of this filter.
public string? Title { get; set; }
Property Value
Value
The value to filter.
public object? Value { get; set; }
Property Value
Methods
Clone()
public IFilterDefinition<T> Clone()
Returns
GenerateFilterFunction(FilterOptions?)
Generates a function which performs the filter.
public Func<T, bool> GenerateFilterFunction(FilterOptions? filterOptions = null)
Parameters
filterOptions
FilterOptionsAny options for generation, such as case sensitivity.