Vue ScrollView API
The ScrollView is a widget that enables a user to scroll its content.
See Also
- Set Up DevExtreme: Angular | Vue | React | jQuery | AngularJS | Knockout | ASP.NET MVC 5 | ASP.NET Core
- Configure a Widget: Angular | Vue | React | jQuery | AngularJS | Knockout | ASP.NET MVC 5 | ASP.NET Core
Props
An object defining configuration options for the ScrollView widget.
| Name | Description |
|---|---|
| bounceEnabled | A Boolean value specifying whether to enable or disable the bounce-back effect. |
| direction | A string value specifying the available scrolling directions. |
| disabled | A Boolean value specifying whether or not the widget can respond to user interaction. |
| elementAttr | Specifies the attributes to be attached to the widget's root element. |
| height | Specifies the widget's height. |
| onDisposing | A function that is executed before the widget is disposed of. |
| onInitialized | A function used in JavaScript frameworks to save the widget instance. |
| onOptionChanged | A function that is executed after a widget option is changed. |
| onPullDown | A function that is executed when the "pull to refresh" gesture is performed. Supported in mobile themes only. |
| onReachBottom | A function that is executed when the content is scrolled down to the bottom. |
| onScroll | A function that is executed on each scroll gesture. |
| onUpdated | A function that is executed each time the widget is updated. |
| pulledDownText | Specifies the text shown in the pullDown panel when pulling the content down lowers the refresh threshold. |
| pullingDownText | Specifies the text shown in the pullDown panel while pulling the content down to the refresh threshold. |
| reachBottomText | Specifies the text shown in the pullDown panel displayed when content is scrolled to the bottom. |
| refreshingText | Specifies the text shown in the pullDown panel displayed when the content is being refreshed. |
| rtlEnabled | Switches the widget to a right-to-left representation. |
| scrollByContent | A Boolean value specifying whether or not an end-user can scroll the widget content swiping it up or down. Applies only if useNative is false |
| scrollByThumb | A Boolean value specifying whether or not an end-user can scroll the widget content using the scrollbar. |
| showScrollbar | Specifies when the widget shows the scrollbar. |
| useNative | Indicates whether to use native or simulated scrolling. |
| width | Specifies the widget's width. |
See Also
- Configure a Widget: Angular | Vue | React | jQuery | AngularJS | Knockout | ASP.NET MVC 5 | ASP.NET Core
Methods
This section describes the members used to manipulate the widget.
| Name | Description |
|---|---|
| beginUpdate() | Prevents the widget from refreshing until the endUpdate() method is called. |
| clientHeight() | Gets the widget's height. |
| clientWidth() | Gets the widget's width. |
| content() | Gets the widget's content. |
| defaultOptions(rule) | Specifies the device-dependent default configuration options for this component. |
| dispose() | Disposes of all the resources allocated to the ScrollView instance. |
| element() | Gets the root widget element. |
| endUpdate() | Refreshes the widget after a call of the beginUpdate() method. |
| getInstance(element) | Gets the instance of a widget found using its DOM node. |
| instance() | Gets the widget's instance. Use it to access other methods of the widget. |
| off(eventName) | Detaches all event handlers from a single event. |
| off(eventName, eventHandler) | Detaches a particular event handler from a single event. |
| on(eventName, eventHandler) | Subscribes to an event. |
| on(events) | Subscribes to events. |
| option() | Gets all widget options. |
| option(optionName) | Gets the value of a single option. |
| option(optionName, optionValue) | Updates the value of a single option. |
| option(options) | Updates the values of several options. |
| refresh() | Locks the widget until the release(preventScrollBottom) method is called and executes the function passed to the onPullDown option and the handler assigned to the pullDown event. |
| release(preventScrollBottom) | Notifies the ScrollView that data loading is finished. |
| scrollBy(distance) | Scrolls the content by a specific distance. |
| scrollBy(distanceObject) | Scrolls the content by a specific distance in horizontal and vertical directions. |
| scrollHeight() | Gets the scrollable content's height in pixels. |
| scrollLeft() | Gets the left scroll offset. |
| scrollOffset() | Gets the scroll offset. |
| scrollTo(targetLocation) | Scrolls the content to a specific position. |
| scrollTo(targetLocationObject) | Scrolls the content to a specific position. |
| scrollToElement(targetLocation) | Scrolls the content to an element. |
| scrollTop() | Gets the top scroll offset. |
| scrollWidth() | Gets the scrollable content's width in pixels. |
| update() | Updates the scrollable contents' dimensions. |
See Also
- Call Methods: Angular | Vue | React | jQuery | AngularJS | Knockout | ASP.NET MVC 5 | ASP.NET Core
Events
This section describes events fired by this widget.
| Name | Description |
|---|---|
| disposing | Raised before the widget is disposed of. |
| initialized | Raised only once, after the widget is initialized. |
| optionChanged | Raised after a widget option is changed. |
| pullDown | Raised when the "pull to refresh" gesture is performed. |
| reachBottom | Raised when the content is scrolled down to the bottom. |
| scroll | Raised on each scroll gesture. |
| updated | Raised each time the widget is updated. |
See Also
- Handle Events: Angular | Vue | React | jQuery | AngularJS | Knockout | ASP.NET MVC 5 | ASP.NET Core
If you have technical questions, please create a support ticket in the DevExpress Support Center.