Umbraco UI Builder
CMSCloudHeartcoreDXP
15.latest
15.latest
  • Umbraco UI Builder Documentation
  • Known Issues
  • Release Notes
  • Getting Started
    • First Steps with UI Builder
    • Requirements
    • Installing Umbraco UI Builder
    • Licensing
    • Configuration
    • User Interface
  • Upgrading
    • Upgrade your UI Builder setup
    • Upgrading Umbraco UI Builder
    • Version Specific Upgrade Notes
    • Migrate from Konstrukt to Umbraco UI Builder
  • How-to Guides
    • Creating your First Integration
  • Areas
    • Explore Areas in UI Builder
    • Sections
      • Summary Dashboards
    • Trees
      • Folders
    • Dashboards
    • Context Apps
  • Collections
    • Work with Collections in UI Builder
    • The Basics
    • List Views
      • Field Views
    • Editors
    • Child Collections
      • Child Collection Groups
      • Retrieve Child Collections
    • Related Collections
    • Entity Identifier Converters
  • Searching
    • Add Search to Your Collections
    • Searchable Properties
  • Filtering
    • Filter Your Data with Ease
    • Global Filters
    • Data Views
      • Data Views Builders
    • Filterable Properties
  • Actions
    • Trigger Actions in UI Builder
    • The Basics
    • Action Visibility
    • Inbuilt Actions
  • Cards
    • Display Insights with Cards
    • Count Cards
    • Custom Cards
  • Property Editors
    • Enhance Input with Property Editors
    • Entity Picker
  • Advanced
    • Ready to go deeper?
    • Virtual Sub Trees
    • Encrypted Properties
    • Value Mappers
    • Repositories
    • Events
  • Miscellaneous
    • Conventions
    • Umbraco Aliases
Powered by GitBook
On this page
  • Defining Filterable Properties
  • Using the AddFilterableProperty() Method
  • Changing the Label of a Filterable Property
  • Using the SetLabel() Method
  • Adding a Description to a Filterable Property
  • Using the SetDescription() Method
  • Defining Basic Options for a Filterable Property
  • Using the SetOptions() Method
  • Defining Options with Custom Compare Clauses for a Filterable Property
  • Using the AddOption() Method
  • Configuring the Mode of a Filterable Property
  • Using the SetMode() Method

Was this helpful?

Edit on GitHub
Export as PDF
  1. Filtering

Filterable Properties

Learn how to configure filterable properties in Umbraco UI Builder.

PreviousData Views BuildersNextTrigger Actions in UI Builder

Last updated 1 month ago

Was this helpful?

Umbraco UI Builder dynamically constructs a filter dialog by choosing appropriate editor views based on basic property configurations. Properties of numeric or date types become range pickers, enums become select/checkbox lists, and other properties are text input filters.

Defining Filterable Properties

Defining filterable properties is controlled via the Collections settings.

Using the AddFilterableProperty() Method

Adds a given property to the filterable properties collection.

Method Syntax

AddFilterableProperty(Lambda filterablePropertyExpression, Lambda filterConfig = null) : CollectionConfigBuilder<TEntityType>

Example

collectionConfig.AddFilterableProperty(p => p.FirstName, filterConfig => filterConfig 
    // ...
);

Changing the Label of a Filterable Property

Using the SetLabel() Method

Sets the label for the filterable property.

Method Syntax

SetLabel(string label) : FilterablePropertyConfigBuilder<TEntityType, TValueType>

Example

filterConfig.SetLabel("First Name");

Adding a Description to a Filterable Property

Using the SetDescription() Method

Sets a description for the filterable property.

Method Syntax

SetDescription(string description) : FilterablePropertyConfigBuilder<TEntityType, TValueType>

Example

filterConfig.SetDescription("The first name of the person");

Defining Basic Options for a Filterable Property

Using the SetOptions() Method

Defines basic options for a filterable property.

Method Syntax

SetOptions(IDictionary<TValueType, string> options) : FilterablePropertyConfigBuilder<TEntityType, TValueType>

Example

filterConfig.SetOptions(new Dictionary<string, string> {
    { "Option1", "Option One" },
    { "Option2", "Option Two" }
});

Defining Options with Custom Compare Clauses for a Filterable Property

Using the AddOption() Method

Defines options with custom comparison clauses for a filterable property.

Method Syntax

AddOption(object key, string label, Lambda compareExpression) : FilterablePropertyConfigBuilder<TEntityType, TValueType>

Example

filterConfig.AddOption("Option1", "Option One", (val) => val != "Option Two");

Configuring the Mode of a Filterable Property

For filterable properties with options, you can configure whether the options should allow multiple or single selections.

Using the SetMode() Method

Configures the mode of a filterable property (multiple or single choice).

Method Syntax

SetMode(FilterMode mode) : FilterablePropertyConfigBuilder<TEntityType, TValueType>

Example

filterConfig.SetMode(FilterMode.MultipleChoice);
Filterable Properties