Filterable Properties
Configuring filterable properties in Konstrukt, the back office UI builder for Umbraco.
Konstrukt can dynamically build a filter dialog choosing appropriate editor views for you based on a simple property configuration. Properties of a number or date types will become range pickers, enums and properties with options defined will become select / checkbox lists and all other properties will become text input filters.

Filterable Properties
Adds the given property to the filterable properties collection.
// Example
collectionConfig.AddFilterableProperty(p => p.FirstName, filterConfig => filterConfig
// ...
);
// Example
filterConfig.SetLabel("First Name");
// Example
filterConfig.SetDescription("The first name of the person");
// Example
filterConfig.SetOptions(new Dictionary<string, string> {
{ "Option1", "Option One" },
{ "Option2", "Option Two" }
});
// Example
filterConfig.AddOption("Option1", "Option One", (val) => val != "Option Two");
For filterable properties with options you can configure whether the options should be multiple or single choice.
// Example
filterConfig.SetMode(KonstruktFilterMode.MultipleChoice);
Last modified 1yr ago