Skip to content

Commit 6e1afb7

Browse files
authored
Merge branch 'master' into slug-migration
2 parents e9c58d5 + a01085c commit 6e1afb7

File tree

16 files changed

+180
-5
lines changed

16 files changed

+180
-5
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#refresh-data-note
2-
>note As part of our `3.0.1` release we introduced the `Rebind` method to the component reference. This would make the rest of the approaches in this article obsolete.
3-
#end
2+
>note As part of our `3.0.1` release we introduced the `Rebind` method to the component reference. This can make some of the approaches in this article obsolete, especially resetting the collection reference.
3+
#end

common-features/adaptive-rendering.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,15 @@ Telerik UI for Blazor supports adaptive rendering for the components that incorp
1717
* [Supported components](#supported-components)
1818
* [Basics](#basics)
1919
* [Rendering specifics](#rendering-specifics)
20+
* [Customize the Default Adaptive Breakpoints](#customize-the-default-adaptive-breakpoints)
2021
* [Limitations](#limitations)
2122

2223
## Supported Components
2324

2425
The adaptive rendering functionality is supported by the following components:
2526

2627
* [AutoComplete](slug://autocomplete-overview)
28+
* [ColorPicker](slug://colorpicker-overview)
2729
* [ComboBox](slug://components/combobox/overview)
2830
* [DatePicker](slug://components/datepicker/overview)
2931
* [DateRangePicker](slug://daterangepicker-overview)
@@ -65,6 +67,40 @@ Three breakpoints define the rendering options as follows:
6567
**Dimensions** | up to 500px | 501px to 768px | over 768px |
6668
**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. |
6769

70+
## Customize the Default Adaptive Breakpoints
71+
72+
You can customize the [above-listed default adaptive breakpoints](#rendering-specifics) at the root level by configuring the [`<TelerikRootComponent>`]({%slug rootcomponent-overview%}). To specify your desired breakpoints:
73+
74+
1. Wrap the content of the `<TelerikRootComponent>` (`@Body` and potentially other elements) in `<ChildContent>` tag.
75+
1. Add the `<RootComponentSettings>` component inside the [`<TelerikRootComponent>`]({%slug rootcomponent-overview%}).
76+
1. Add the `<RootComponentAdaptiveSettings>` component inside the `<RootComponentSettings>` tag and configure its properties:
77+
78+
@[template](/_contentTemplates/common/parameters-table-styles.md#table-layout)
79+
80+
| Parameter | Type | Description |
81+
| ----------- | ----------- | ----------- |
82+
| `Small` | `int` <br/> (`500`) | The upper boundary of the small threshold. Sets the `max-width` of the small media query in `px`. |
83+
| `Medium` | `int` <br/> (`768`) | The upper boundary of the medium threshold. Sets the `max-width` of the medium media query in `px`.|
84+
85+
>caption Customize the default adaptive breakpoints
86+
87+
<div class="skip-repl"></div>
88+
````RAZOR
89+
@* The below configuration sets the following thresholds:
90+
- Small: 0 to 400px
91+
- Medium: 401px to 900px
92+
- Large: over 900px *@
93+
94+
<TelerikRootComponent>
95+
<RootComponentSettings>
96+
<RootComponentAdaptiveSettings Small="400" Medium="900"></RootComponentAdaptiveSettings>
97+
</RootComponentSettings>
98+
<ChildContent>
99+
@Body
100+
</ChildContent>
101+
</TelerikRootComponent>
102+
````
103+
68104
## Limitations
69105

70106
Some of the [supported components](#supported-components) allow custom values, for example, [ComboBox](slug://components/combobox/custom-value) and [MultiColumnComboBox](slug://multicolumncombobox-custom-value). Using custom values with `AdaptiveMode.Auto` is currently not supported. To expedite the development of this feature, vote for the related feature request in the Blazor Feedback Portal: [Support for custom values in `AdaptiveMode`](https://feedback.telerik.com/blazor/1611829-support-for-custom-values-in-adaptivemode).
@@ -73,6 +109,7 @@ Some of the [supported components](#supported-components) allow custom values, f
73109

74110
* [Live Demo: AutoComplete](https://demos.telerik.com/blazor-ui/autocomplete/adaptive)
75111
* [Live Demo: ComboBox](https://demos.telerik.com/blazor-ui/combobox/adaptive)
112+
* [Live Demo: ColorPicker](https://demos.telerik.com/blazor-ui/colorpicker/adaptive)
76113
* [Live Demo: DatePicker](https://demos.telerik.com/blazor-ui/datepicker/adaptive)
77114
* [Live Demo: DateRangePicker](https://demos.telerik.com/blazor-ui/daterangepicker/adaptive)
78115
* [Live Demo: DateTimePicker](https://demos.telerik.com/blazor-ui/datetimepicker/adaptive)

components/autocomplete/overview.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ The Blazor AutoComplete provides various parameters that allow you to configure
8888
| `Filterable` | `bool` | Whether [filtering](slug://multiselect-filter) is enabled for the end user (suggestions will get narrowed down as they type). |
8989
| `FilterOperator` | `StringFilterOperator` <br /> (`StartsWith`) | The string operation that will be used for [filtering](slug://multiselect-filter). |
9090
| `Id` | `string` | Renders as the `id` attribute on the `<input />` element, so you can attach a `<label for="">` to the input.|
91+
| `InputMode` | `string` | The [`inputmode` attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/inputmode) of the `<input />` element. |
9192
| `LoaderShowDelay` | `int ` <br /> 300 | Time in milliseconds between opening the popup and showing the loading skeleton in it when the data is not yet available. |
9293
| `TItem` | `Type` | The type of the model to which the component is bound. Required if you can't provide `Data` or `Value`. Determines the type of the reference object. |
9394
| `Title` | `string` | The title text rendered in the header of the popup(action sheet). Applicable only when [`AdaptiveMode` is set to `Auto`](slug://adaptive-rendering). |

components/colorpicker/overview.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ The ColorPicker tag exposes the following features through its attributes:
7474

7575
| Parameter | Type and Default Value | Description |
7676
| --- | --- | --- |
77+
| `AdaptiveMode` | `AdaptiveMode` <br /> (`None`) | The [adaptive mode]({%slug adaptive-rendering%}) of the component. |
7778
| `Value` | `string` | The ColorPicker value in a few [different color formats](#supported-value-formats). Supports two-way binding. |
7879
| `ValueFormat` | `ColorFormat` enum <br /> (`Rgb`) | Sets the color format, which the component will return in the application code - `Rgb` or `Hex`. |
7980
| `ColorPickerViews` | `RenderFragment` | A nested container to list the [ColorPicker views](slug://colorpicker-views). All views are enabled by default and the user can switch between them with the buttons. Each view tag has its own configuration attributes. |

components/combobox/overview.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ The Blazor ComboBox @[template](/_contentTemplates/dropdowns/features.md#groupin
9393
|`Filterable` | `bool` | whether [filtering](slug://components/combobox/filter) is enabled for the end user. |
9494
| `FilterOperator` | `StringFilterOperator` <br /> (`StartsWith`) | the method of [filtering](slug://components/combobox/filter) the items. |
9595
| `Id` | `string` | renders as the `id` attribute on the `<input />` element, so you can attach a `<label for="">` to the input. |
96+
| `InputMode` | `string` | The [`inputmode` attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/inputmode) of the `<input />` element. |
9697
| `LoaderShowDelay` | `int ` <br /> 300 | Time in milliseconds between opening the popup and showing the loading skeleton in it when the data is not yet available. |
9798
| `Placeholder` | `string` | the text the user sees as a hint when no item is selected. In order for it to be shown, the `Value` parameter should be set to a default value depending on the type defined in the `ValueField` parameter. For example, `0` for an `int`, and `null` for an `int?` or `string`. You need to make sure that it does not match the value of an existing item in the data source. |
9899
| `TItem` | `Type` | the type of the model to which the component is bound. Required if you can't provide `Data` or `Value`. Determines the type of the reference object. |

components/dateinput/overview.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ The following section lists some Date Input parameters and links to other pages
9898
| `ReadOnly` | `bool` | If set to `true`, the component will be readonly and will not allow user input. The component is not readonly by default and allows user input. |
9999
| `Format` | `string` <br /> (`ShortDatePattern`) | The textbox mask and date format that the user input must match. The default value depends on `CultureInfo.CurrentCulture`. Read more in the [Supported Formats](slug://components/dateinput/supported-formats) article. |
100100
| `Id` | `string` | The `id` attribute of the `input`. |
101+
| `InputMode` | `string` | The [`inputmode` attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/inputmode) of the `<input />` element. |
101102
| `Max` | `DateTime` <br /> (`new DateTime(2099, 12, 31)`)| The latest allowed date that the user can type. |
102103
| `Min` | `DateTime` <br /> (`DateTime(1900, 1, 1)`)| The earliest allowed date that the user can type. |
103104
| `Placeholder` | `string` | The [`placeholder` attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#placeholder) of the `input`. The placeholder will appear only if the component is bound to nullable `DateTime?` object, the `Value` is `null` and the component is not focused. Once the user focuses it to start typing, the `FormatPlaceholder` (default or [custom one](#format-placeholder)) will override the `Placeholder` to indicate the expected date format. |

components/datepicker/overview.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ The Blazor Date Picker provides various parameters that allow you to configure t
8383
| `ReadOnly` | `bool` | If set to `true`, the component will be readonly and will not allow user input. The component is not readonly by default and allows user input. |
8484
| `Format` | `string` <br /> (`ShortDatePattern`) | The format of the DatePicker's DateInput. The default value depends on `CultureInfo.CurrentCulture`. Read more at [Supported date formats by the DateInput](slug://components/dateinput/supported-formats). |
8585
| `Id` | `string` | The `id` attribute on the `<input />` element. Use it to attach a `<label for="">` to the input. |
86+
| `InputMode` | `string` | The [`inputmode` attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/inputmode) of the `<input />` element. |
8687
| `Max` | `DateTime` <br /> (`DateTime(2099, 12, 31, 23, 59, 59)`)| The latest date that the user can select. |
8788
| `Min` | `DateTime` <br /> (`DateTime(1900, 1, 1, 0, 0, 0)`)| The earliest date that the user can select. |
8889
| `Placeholder` | `string` | Maps to the `placeholder` attribute of the HTML element. The `Placeholder` will appear if the component is bound to a **nullable** DateTime object - `DateTime?`. It will not be rendered if the component is bound to the default value of a non-nullable DateTime object. The Placeholder value will be displayed when the input is not focused. Once the user focuses it to start typing, the Format Placeholder (default or [customized one](#format-placeholder)) will override the Placeholder to indicate the format the date should be entered in. |

components/daterangepicker/overview.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ The Blazor Date Range Picker provides various parameters that allow you to confi
8585
| `Format` | `string` <br /> (`ShortDatePattern`) | The format of the DateRangePicker DateInputs. The default value depends on `CultureInfo.CurrentCulture`. Read more at [Supported date formats by the DateInput](slug://components/dateinput/supported-formats). |
8686
| `Max` | `DateTime` <br /> (`DateTime(2099, 12, 31)`) | The latest date that the user can select. |
8787
| `Min` | `DateTime` <br /> (`DateTime(1900, 1, 1)`)| The earliest date that the user can select. |
88+
| `InputMode` | `string` | The [`inputmode` attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/inputmode) of the `<input />` element. |
8889
| `Orientation` | `CalendarOrientation`enum <br /> (`Horizontal`) | The orientation of the calendar popup. The available options are `Horizontal` and `Vertical`. |
8990
| `Placeholder` |`string` | The `placeholder` attribute of the two `<input />` elements. The `Placeholder` will appear if the component is bound to **nullable** DateTime objects - `DateTime?`, but will not be rendered if the component is bound to the default value of a non-nullable DateTime objects. The Placeholder value will be displayed when the input is not focused. Once the user focuses it to start typing, the Format Placeholder (default or [customized one](#format-placeholder)) will override the Placeholder to indicate the format the date should be entered in. |
9091
| `ShowClearButton` | `bool` | Defines if the user can clear the component value through an **x** button rendered inside the input. |

components/datetimepicker/overview.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ The Blazor Date Time Picker provides various parameters that allow you to config
7979
| `ReadOnly` | `bool` | If set to `true`, the component will be readonly and will not allow user input. The component is not readonly by default and allows user input. |
8080
| `Format` | `string` <br /> (`FullDateTimePattern`) | The format of the DateTimePicker's DateInput. The default value depends on `CultureInfo.CurrentCulture`. Read more at [Supported date formats by the DateInput](slug://components/dateinput/supported-formats). |
8181
| `Id` | `string` | The `id` HTML attribute of the `input` |
82+
| `InputMode` | `string` | The [`inputmode` attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/inputmode) of the `<input />` element. |
8283
| `Max` | `DateTime` <br /> (`DateTime(2099, 12, 31, 23, 59, 59)`) | The latest date and time that the user can select |
8384
| `Min` | `DateTime` <br /> (`DateTime(1900, 1, 1, 0, 0, 0)`) | The earliest date and time that the user can select |
8485
| `Placeholder` | `string` | The `placeholder` attribute of the HTML element. The placeholder will appear if the component is bound to nullable DateTime object - `DateTime?`, but will not be rendered if the component is bound to the default value of a non-nullable DateTime object. The Placeholder value will be displayed when the input is not focused. Once the user focuses it to start typing, the Format Placeholder (default or [customized one](#format-placeholder)) will override the Placeholder to indicate the format the date should be entered in. |

components/dropdownlist/overview.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ The Blazor DropDownList @[template](/_contentTemplates/dropdowns/features.md#gro
9494
| `FilterOperator` | `StringFilterOperator` <br /> (`StartsWith`)| The method of [filtering](slug://components/dropdownlist/filter) the items. |
9595
| `FilterPlaceholder` | `string` | The hint that will be displayed in the filter input when it has no value.
9696
| `Id` | `string` | The `id` attribute rendered on the main wrapping element of the component (`<span class="k-dropdownlist">`). You can use it to attach a `<label for="">` to it. |
97+
| `InputMode` | `string` | The [`inputmode` attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/inputmode) of the `<input />` element. |
9798
| `TItem` | `Type`| The type of the model to which the component is bound. Required if you can't provide `Data` or `Value`. Determines the type of the reference object. |
9899
| `TValue` | `Type` | The type of the value field from the model to which the component is bound. Required if you can't provide `Data` or `Value`. Determines the type of the reference object. The type of the values can be:<br /> - `number` (such as `int`, `double`, and so on)<br /> - `string`<br /> - `Guid`<br /> - `Enum` |
99100
| `Title` | `string` | The title text rendered in the header of the dropdown list popup (action sheet). Applicable only when [`AdaptiveMode` is set to `Auto`](slug://adaptive-rendering). |

0 commit comments

Comments
 (0)