Skip to content
This repository was archived by the owner on Jun 4, 2024. It is now read-only.

Fix issue #300: changing pagination button text #480

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions dash_table/DataTable.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ class DataTable(Component):
- page_action (a value equal to: 'custom', 'native', 'none'; optional): `page_action` refers to a mode of the table where
not all of the rows are displayed at once: only a subset
are displayed (a "page") and the next subset of rows
can viewed by clicking "Next" or "Previous" buttons
can viewed by clicking "<" (previous) or ">" (next) buttons
at the bottom of the page.

Pagination is used to improve performance: instead of
Expand All @@ -323,7 +323,7 @@ class DataTable(Component):
With pagination, we can either page through data that exists
in the table (e.g. page through `10,000` rows in `data` `100` rows at a time)
or we can update the data on-the-fly with callbacks
when the user clicks on the "Previous" or "Next" buttons.
when the user clicks on the "<" (previous) or ">" (next) buttons.
These modes can be toggled with this `page_action` parameter:
- `'native'`: all data is passed to the table up-front, paging logic is
handled by the table
Expand Down
4 changes: 2 additions & 2 deletions dash_table/bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dash_table/bundle.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dash_table/demo.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dash_table/demo.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dash_table/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -750,7 +750,7 @@
]
},
"required": false,
"description": "`page_action` refers to a mode of the table where\nnot all of the rows are displayed at once: only a subset\nare displayed (a \"page\") and the next subset of rows\ncan viewed by clicking \"Next\" or \"Previous\" buttons\nat the bottom of the page.\n\nPagination is used to improve performance: instead of\nrendering all of the rows at once (which can be expensive),\nwe only display a subset of them.\n\nWith pagination, we can either page through data that exists\nin the table (e.g. page through `10,000` rows in `data` `100` rows at a time)\nor we can update the data on-the-fly with callbacks\nwhen the user clicks on the \"Previous\" or \"Next\" buttons.\nThese modes can be toggled with this `page_action` parameter:\n- `'native'`: all data is passed to the table up-front, paging logic is\nhandled by the table\n- `'custom'`: data is passed to the table one page at a time, paging logic\nis handled via callbacks\n- `none`: disables paging, render all of the data at once",
"description": "`page_action` refers to a mode of the table where\nnot all of the rows are displayed at once: only a subset\nare displayed (a \"page\") and the next subset of rows\ncan viewed by clicking \"<\" (previous) or \">\" (next) buttons\nat the bottom of the page.\n\nPagination is used to improve performance: instead of\nrendering all of the rows at once (which can be expensive),\nwe only display a subset of them.\n\nWith pagination, we can either page through data that exists\nin the table (e.g. page through `10,000` rows in `data` `100` rows at a time)\nor we can update the data on-the-fly with callbacks\nwhen the user clicks on the \"<\" (previous) or \">\" (next) buttons.\nThese modes can be toggled with this `page_action` parameter:\n- `'native'`: all data is passed to the table up-front, paging logic is\nhandled by the table\n- `'custom'`: data is passed to the table one page at a time, paging logic\nis handled via callbacks\n- `none`: disables paging, render all of the data at once",
"defaultValue": {
"value": "'native'",
"computed": false
Expand Down Expand Up @@ -1757,4 +1757,4 @@
}
}
}
}
}
4 changes: 2 additions & 2 deletions inst/deps/bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion inst/deps/bundle.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions inst/deps/demo.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion inst/deps/demo.js.map

Large diffs are not rendered by default.

5 changes: 2 additions & 3 deletions man/dashDataTable.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ and not have borders between the columns.}
\item{pagination_mode}{A value equal to: 'fe', 'be', true, false. "pagination" refers to a mode of the table where
not all of the rows are displayed at once: only a subset
are displayed (a "page") and the next subset of rows
can viewed by clicking "Next" or "Previous" buttons
can viewed by clicking "<" (previous) or ">" (next) buttons
at the bottom of the page.

Pagination is used to improve performance: instead of
Expand All @@ -371,7 +371,7 @@ we only display a subset of them.
With pagination, we can either page through data that exists
in the table (e.g. page through `10,000` rows in `data` `100` rows at a time)
or we can update the data on-the-fly with callbacks
when the user clicks on the "Previous" or "Next" buttons.
when the user clicks on the "<" (previous) or ">" (next) buttons.
These modes can be toggled with this `pagination_mode` parameter:
- `'fe'` refers to "front-end" paging: passing large data up-front
- `'be'` refers to "back-end" paging: updating the data on the fly via callbacks
Expand Down Expand Up @@ -759,4 +759,3 @@ across all pages.}
Subscribe to [https://github.com/plotly/dash-table/issues/168](https://github.com/plotly/dash-table/issues/168)
for updates on the dropdown API.}
}

4 changes: 2 additions & 2 deletions src/dash-table/components/ControlledTable/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -796,8 +796,8 @@ export default class ControlledTable extends PureComponent<ControlledTableProps>
</div>
{!this.displayPagination ? null : (
<div>
<button className='previous-page' onClick={this.loadPrevious}>Previous</button>
<button className='next-page' onClick={this.loadNext}>Next</button>
<button className='previous-page' onClick={this.loadPrevious}>&lt;</button>
<button className='next-page' onClick={this.loadNext}>&gt;</button>
</div>
)}
</div>);
Expand Down
4 changes: 2 additions & 2 deletions src/dash-table/dash/DataTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,7 @@ export const propTypes = {
* `page_action` refers to a mode of the table where
* not all of the rows are displayed at once: only a subset
* are displayed (a "page") and the next subset of rows
* can viewed by clicking "Next" or "Previous" buttons
* can viewed by clicking "<" (previous) or ">" (next) buttons
* at the bottom of the page.
*
* Pagination is used to improve performance: instead of
Expand All @@ -567,7 +567,7 @@ export const propTypes = {
* With pagination, we can either page through data that exists
* in the table (e.g. page through `10,000` rows in `data` `100` rows at a time)
* or we can update the data on-the-fly with callbacks
* when the user clicks on the "Previous" or "Next" buttons.
* when the user clicks on the "<" (previous) or ">" (next) buttons.
* These modes can be toggled with this `page_action` parameter:
* - `'native'`: all data is passed to the table up-front, paging logic is
* handled by the table
Expand Down