Class “RefreshComposite”
Object > NativeObject > Widget > Composite > RefreshComposite
A composite allowing to use a pull-to-refresh gesture to trigger and visualize a long running operation.


| Constructor | public |
| Singleton | No |
| Namespace | tabris |
| Direct subclasses | None |
| JSX support | Element: <RefreshComposite/>Parent element: <Composite/> and any widget extending CompositeChild elements: Widgets Text content: Not supported |
Example
import {RefreshComposite, contentView} from 'tabris';
new RefreshComposite({layoutData: 'stretch'})
.onRefresh(() => console.log('Refreshing...'))
.appendTo(contentView);
See also:
JSX Creating a simple RefreshComposite
Constructor
new RefreshComposite(properties?)
| Parameter | Type | Optional | Description |
|---|---|---|---|
| properties | Properties<RefreshComposite> |
Yes | Sets all key-value pairs in the properties object as widget properties. |
Properties
refreshEnabled
Whether the pull-to-refresh gesture can be performed by the user. When disabled, the RefreshComposite behaves like a regular Composite.
| Type | boolean |
| Default | true |
| Settable | Yes |
| Change events | Yes |
refreshIndicator
Whether to visualize a long running operation. After the user has triggered a manual refresh, this property is true and should be set to false when the operation ended.
| Type | boolean |
| Settable | Yes |
| Change events | Yes |
refreshMessage
iOS
A message to show to the user during the refresh operation.
| Type | string |
| Settable | Yes |
| Change events | Yes |
Events
refresh
Fired when a refresh is triggered by the user.
Change Events
refreshEnabledChanged
Fired when the refreshEnabled property has changed.
| Parameter | Type | Description |
|---|---|---|
| value | boolean |
The new value of refreshEnabled. |
refreshIndicatorChanged
Fired when the refreshIndicator property has changed.
| Parameter | Type | Description |
|---|---|---|
| value | boolean |
The new value of refreshIndicator. |
refreshMessageChanged
Fired when the refreshMessage property has changed.
| Parameter | Type | Description |
|---|---|---|
| value | string |
The new value of refreshMessage. |