The Page Input component for Retool Apps
An input field to jump to a specific page of data.
Page Input displays the total number of pages and automatically updates to reflect the currently selected page. Use Pagination for navigating pages of data using numbered links.
Properties
All properties for this object with supported data types or values. You can write JavaScript almost anywhere in Retool to manipulate or read property values.
disabled
Whether input, interaction, selection, or triggering is disabled.
Type | boolean | ||||||
Format | True/False | ||||||
Mutability |
| ||||||
Default |
|
Examples
true
events
A list of configured event handlers that trigger actions or queries.
Type | array | ||||
Array values | object | ||||
Mutability |
|
Array Object Properties
event
The event that triggers the action. Refer to the events section for details of available events for this object.
Type | string | ||||
Mutability |
|
method
The JavaScript method to perform when type
is datasource
, widget
, state
, or localStorage
.
Type | string | ||||
Mutability |
|
type
The type of action to perform.
Type | string | ||||||||||||||
Mutability |
| ||||||||||||||
Allowed Values |
|
hidden
Whether this object is hidden from view.
Type | boolean | ||||||
Format | True/False | ||||||
Mutability |
| ||||||
Default |
|
Examples
true
horizontalAlign
The horizontal alignment of the contents.
Type | string | ||||||||||
Format | Plain Text | ||||||||||
Mutability |
| ||||||||||
Allowed Values |
| ||||||||||
Default |
|
id
The unique identifier (name).
Type | string | ||||
Format | Plain Text | ||||
Mutability |
| ||||
Default |
|
Examples
query1
button1
isHiddenOnDesktop
Whether to show or hide this object in the desktop layout.
Type | boolean | ||||
Format | True/False | ||||
Mutability |
| ||||
Default |
|
Examples
true
isHiddenOnMobile
Whether to show or hide this object in the mobile layout.
Type | boolean | ||||
Format | True/False | ||||
Mutability |
| ||||
Default |
|
Examples
true
maintainSpaceWhenHidden
Whether to take up space on the canvas if hidden
is true
.
Type | boolean | ||||
Format | True/False | ||||
Mutability |
| ||||
Default |
|
Examples
true
margin
The amount of margin to render outside.
Type | string | |||||||||
Format | Plain Text | |||||||||
Mutability |
| |||||||||
Allowed Values |
| |||||||||
Default |
|
Examples
4px 8px
max
The maximum value to allow.
Type | number | ||||
Mutability |
|
showInEditor
Whether the component remains visible in the editor if hidden
is true
.
Type | boolean | ||||
Format | True/False | ||||
Mutability |
| ||||
Default |
|
Examples
true
style
Custom style options.
Type | object | ||||
Mutability |
|
textAfter
The suffix text to display.
Type | string | ||||
Format | Plain Text | ||||
Mutability |
| ||||
Default |
|
Examples
USD
px
@example.com
textBefore
The prefix text to display.
Type | string | ||||
Format | Plain Text | ||||
Mutability |
| ||||
Default |
|
Examples
$
Email address
SKU
Methods
JavaScript API methods for this object. You can write JavaScript almost anywhere in Retool and use methods to manipulate data and property values.
pageInput.clearValue()
Examples
Clear the current value of pageInput
.
pageInput.clearValue();
pageInput.resetValue()
Examples
Reset the current value of pageInput
.
pageInput.resetValue();
pageInput.scrollIntoView()
Scrolls the canvas or parent container so that the selected component appears in the visible area.
pageInput.scrollIntoView(options)
Parameters
Object Properties
behavior
The scroll behavior.
Type | string | ||||||
Allowed Values |
|
block
The scroll position relative to the component.
Type | string | ||||||||||
Allowed Values |
|
Examples
Scroll the minimum amount to immediately bring pageInput
into view.
pageInput.scrollIntoView({behavior: 'auto', block: 'nearest'});
pageInput.setDisabled()
Set the disabled
value to toggle whether the input field is disabled. Defaults to true
without a parameter.
pageInput.setDisabled(disabled)
Parameters
disabled
Whether input, interaction, selection, or triggering is disabled.
Type | boolean |
Format | True/False |
Default |
|
Examples
true
Examples
Disable pageInput
.
pageInput.setDisabled(true);
Enable pageInput
.
pageInput.setDisabled(false);
pageInput.setHidden()
Set the hidden
value to toggle whether the component is visible. Defaults to true
without a parameter.
pageInput.setHidden(hidden)
Parameters
Examples
true
Examples
Hide pageInput
.
pageInput.setHidden(true);
Unhide pageInput
.
pageInput.setHidden(false);
pageInput.setValue(value)
Examples
Set the current value of pageInput
to userValue
.
pageInput.setValue(userValue);
Events
Events triggered by user interactions. You can configure event handlers in the IDE to trigger queries or other actions in response to events.
Event | Description |
---|---|
Change | The value is changed. |