diff --git a/_contentTemplates/dropdowns/adaptive-rendering.md b/_contentTemplates/dropdowns/adaptive-rendering.md new file mode 100644 index 0000000000..7d81bba92f --- /dev/null +++ b/_contentTemplates/dropdowns/adaptive-rendering.md @@ -0,0 +1,7 @@ +#intro +The component supports different popup rendering depending on the screen size. [Read more about the Adaptive Rendering functionality and how to enable it...]({%slug adaptive-rendering%}) +#end + +#value-changed +> If [`AdaptiveRendering`]({%slug adaptive-rendering%}) is enabled, on small and medium devices `ValueChanged` will fire only when the user clicks the confirmation button in the action sheet. +#end \ No newline at end of file diff --git a/common-features/adaptive-rendering.md b/common-features/adaptive-rendering.md new file mode 100644 index 0000000000..1a2ce9a50b --- /dev/null +++ b/common-features/adaptive-rendering.md @@ -0,0 +1,81 @@ +--- +title: Adaptive Rendering +page_title: Adaptive Rendering +description: Explore how the components with popup elements can react to the changes in the +slug: adaptive-rendering +tags: telerik,blazor,adaptive,rendering,mobile +published: True +position: 0 +--- + +# Adaptive Rendering + +Telerik UI for Blazor supports adaptive rendering for the components that incorporate popup elements. This functionality allows the component to adapt to the screen size by providing different rendering of the popup element based on the screen dimensions. + +>caption In this article: + +* [Supported components](#supported-components) +* [Basics](#basics) +* [Rendering specifics](#rendering-specifics) +* [Limitations](#limitations) + +## Supported components + +The adaptive rendering functionality is supported by the following components: + +* [AutoComplete]({%slug autocomplete-overview%}) +* [ComboBox]({%slug components/combobox/overview%}) +* [DatePicker]({%slug components/datepicker/overview%}) +* [DateRangePicker]({%slug daterangepicker-overview%}) +* [DateTimePicker]({%slug components/datetimepicker/overview%}) +* [DropDownList]({%slug components/dropdownlist/overview%}) +* [MultiColumnComboBox]({%slug multicolumncombobox-overview%}) +* [MultiSelect]({%slug multiselect-overview%}) +* [TimePicker]({%slug components/timepicker/overview%}) + +## Basics + +To enable the adaptive rendering use the `AdaptiveMode` parameter. It takes a member of the `AdaptiveMode` enum: + +* `None` (default) +* `Auto` + +Optionally, you may set the `Title` parameter to provide custom header text for the popup on small and medium devices. + +>caption Enable the adaptive rendering + +````CSHTML +// NOTE: The configurations below includes only the DropDownList, but it is applicable to all of the above listed components + +// Adapts to the screen size to use the appropriate rendering. + +```` + +# Rendering specifics + +When you set the `AdaptiveMode` to `Auto`, the component will take the screen size into consideration to use the appropriate rendering. The different rendering targets the popup element of the component and how it will be displayed to the user. + +Three breakpoints define the rendering options as follows: + +@[template](/_contentTemplates/common/parameters-table-styles.md#table-layout) + +|| **Small** | **Medium** | **Large** | +|-------|-------|--------|-------| +**Dimensions** | up to 500px | 501px to 768px | over 768px | +**Rendering** | The popup is rendered as a fullscreen action sheet. | The popup is rendered as an action sheet docked to the bottom of the screen. | The popup is rendered as an animation container docked to the main element of the component. | + +## Limitations + +* Custom values - some of the listed components allow custom values (for example, [ComboBox]({%slug components/combobox/custom-value%}), [MultiColumnComboBox]({%slug multicolumncombobox-custom-value%})). This feature is not compatible with `AdaptiveMode.Auto`. + +## See also + +* [Live Demo: AutoComplete](https://demos.telerik.com/blazor-ui/autocomplete/adaptive) +* [Live Demo: ComboBox](https://demos.telerik.com/blazor-ui/combobox/adaptive) +* [Live Demo: DatePicker](https://demos.telerik.com/blazor-ui/datepicker/adaptive) +* [Live Demo: DateRangePicker](https://demos.telerik.com/blazor-ui/daterangepicker/adaptive) +* [Live Demo: DateTimePicker](https://demos.telerik.com/blazor-ui/datetimepicker/adaptive) +* [Live Demo: DropDownList](https://demos.telerik.com/blazor-ui/dropdownlist/adaptive) +* [Live Demo: MultiColumnComboBox](https://demos.telerik.com/blazor-ui/multicolumncombobox/adaptive) +* [Live Demo: MultiSelect](https://demos.telerik.com/blazor-ui/multiselect/adaptive) +* [Live Demo: TimePicker](https://demos.telerik.com/blazor-ui/timepicker/adaptive) diff --git a/components/autocomplete/overview.md b/components/autocomplete/overview.md index 5e960e2a93..49d83d6271 100644 --- a/components/autocomplete/overview.md +++ b/components/autocomplete/overview.md @@ -68,6 +68,10 @@ The Blazor AutoComplete @[template](/_contentTemplates/dropdowns/features.md#gro @[template](/_contentTemplates/dropdowns/features.md#virtualization) [Read more about the Blazor AutoComplete virtualization...]({% slug autocomplete-virtualization %}) +## Adaptive Rendering + +@[template](/_contentTemplates/dropdowns/adaptive-rendering.md#intro) + ## Parameters The Blazor AutoComplete provides various parameters that allow you to configure the component: @@ -76,20 +80,22 @@ The Blazor AutoComplete provides various parameters that allow you to configure | Parameter | Type | Description | | ----------- | ----------- | -------| -| `Data` | `IEnumerable` | allows you to provide the data source. Required. -| `DebounceDelay` | `int`
150 | Time in milliseconds between the last typed symbol and the internal `oninput` event firing. Applies when the user types and filters. Use it to balance between client-side performance and number of database queries. +| `AdaptiveMode` | `AdaptiveMode`
(`None`) | The [adaptive mode]({%slug adaptive-rendering%}) of the component. | +| `Data` | `IEnumerable` | allows you to provide the data source. Required. | +| `DebounceDelay` | `int`
150 | Time in milliseconds between the last typed symbol and the internal `oninput` event firing. Applies when the user types and filters. Use it to balance between client-side performance and number of database queries. | | `Enabled` | `bool` | Whether the component is enabled. | | `Filterable` | `bool` | Whether [filtering]({%slug multiselect-filter%}) is enabled for the end user (suggestions will get narrowed down as they type). | | `FilterOperator` | `StringFilterOperator`
(`StartsWith`) | The string operation that will be used for [filtering]({%slug multiselect-filter%}). | | `Id` | `string` | Renders as the `id` attribute on the `` element, so you can attach a `