Skip to content

Commit 0b128ad

Browse files
committed
Sync with Kendo UI Professional
1 parent f6261dc commit 0b128ad

File tree

1 file changed

+26
-2
lines changed

1 file changed

+26
-2
lines changed

docs/api/javascript/kendo.md

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -315,12 +315,20 @@ The `onChange` method will be executed when the media query is matched or not ma
315315

316316
The `destroy` method will remove the event listeners and destroy the `MediaQueryList` instance. Note that developers should call the `destroy` method when the media query is no longer needed.
317317

318+
You can modify the default [`media queries`](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_media_queries) for the adaptive components by modifying the breakpoints defined in `kendo.defaults.breakpoints`. The default break points are defined as:
319+
320+
`kendo.defaults.breakpoints = { small: '(max-width: 700px)', medium: '(min-width: 700.1px) and (max-width: 768px)', large: '(min-width: 768.1px)' }`
321+
318322
#### Parameters
319323

320324
##### media `String`
321325

322326
The media query that will create the [MediaQueryList instance](https://developer.mozilla.org/en-US/docs/Web/API/MediaQueryList).
323327

328+
#### Returns
329+
330+
`Object` with the `mediaQueryList` field and the `onChange`, `onEnter`, `onLeave` and `destroy` methods.
331+
324332
#### Example - Using a string
325333

326334
<script>
@@ -359,10 +367,26 @@ The media query that will create the [MediaQueryList instance](https://developer
359367
mediaQueryListener.destroy();
360368
</script>
361369

362-
#### Returns
370+
#### Example - Modify the default breakpoints for the the adaptive components
363371

364-
`Object` with the `mediaQueryList` field and the `onChange`, `onEnter`, `onLeave` and `destroy` methods.
372+
```dojo
373+
<input id="dropdownlist"/>
374+
<script>
375+
let defaultBreakpoints = {
376+
small: '(max-width: 2000px)',
377+
medium: '(min-width: 2000px) and (max-width: 2800px)',
378+
large: '(min-width: 2800px)'
379+
}
380+
381+
kendo.setDefaults('breakpoints', defaultBreakpoints);
365382
383+
$("#dropdownlist").kendoDropDownList({
384+
adaptiveMode:"auto",
385+
dataSource: ["Item1", "Item2"],
386+
value: "Item1"
387+
});
388+
</script>
389+
```
366390

367391

368392
### observableFileManagerData

0 commit comments

Comments
 (0)