Skip to content

Commit

Permalink
Revert "docs: pluginState.page is now pluginState.pagination" (#1080)
Browse files Browse the repository at this point in the history
  • Loading branch information
AdrianGonz97 authored May 7, 2024
1 parent ac7cce8 commit 5515015
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 17 deletions.
10 changes: 5 additions & 5 deletions apps/www/src/content/components/data-table.md
Original file line number Diff line number Diff line change
Expand Up @@ -631,7 +631,7 @@ Next, we'll add pagination to our table
const { headerRows, pageRows, tableAttrs, tableBodyAttrs, pluginStates } =
table.createViewModel(columns);
const { hasNextPage, hasPreviousPage, pageIndex } = pluginStates.pagination;
const { hasNextPage, hasPreviousPage, pageIndex } = pluginStates.page;
</script>
```

Expand Down Expand Up @@ -770,7 +770,7 @@ Let's enable the `addSortBy` plugin and import the `<ArrowUpDown />` icon which
const { headerRows, pageRows, tableAttrs, tableBodyAttrs, pluginStates } =
table.createViewModel(columns);
const { hasNextPage, hasPreviousPage, pageIndex } = pluginStates.pagination;
const { hasNextPage, hasPreviousPage, pageIndex } = pluginStates.page;
</script>
```

Expand Down Expand Up @@ -945,7 +945,7 @@ We'll start by enabling the `addTableFilter` plugin and importing the `<Input />
const { headerRows, pageRows, tableAttrs, tableBodyAttrs, pluginStates } =
table.createViewModel(columns);
const { pageIndex, hasNextPage, hasPreviousPage } = pluginStates.pagination;
const { pageIndex, hasNextPage, hasPreviousPage } = pluginStates.page;
const { filterValue } = pluginStates.filter;
</script>
```
Expand Down Expand Up @@ -1115,7 +1115,7 @@ We'll start by enabling the `addHiddenColumns` plugin. We'll also need a `<Chevr
flatColumns,
} = table.createViewModel(columns);
const { pageIndex, hasNextPage, hasPreviousPage } = pluginStates.pagination;
const { pageIndex, hasNextPage, hasPreviousPage } = pluginStates.page;
const { filterValue } = pluginStates.filter;
const { hiddenColumnIds } = pluginStates.hide;
Expand Down Expand Up @@ -1342,7 +1342,7 @@ Next, we'll enable the `addSelectedRows` plugin and import the `<Checkbox />` co
rows,
} = table.createViewModel(columns);
const { pageIndex, hasNextPage, hasPreviousPage } = pluginStates.pagination;
const { pageIndex, hasNextPage, hasPreviousPage } = pluginStates.page;
const { filterValue } = pluginStates.filter;
const { hiddenColumnIds } = pluginStates.hide;
const { selectedDataIds } = pluginStates.select;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
const table = createTable(readable(data), {
sort: addSortBy({ disableMultiSort: true }),
pagination: addPagination(),
page: addPagination(),
filter: addTableFilter({
fn: ({ filterValue, value }) => value.includes(filterValue),
}),
Expand Down Expand Up @@ -151,7 +151,7 @@
.filter(([, hide]) => !hide)
.map(([id]) => id);
const { hasNextPage, hasPreviousPage, pageIndex } = pluginStates.pagination;
const { hasNextPage, hasPreviousPage, pageIndex } = pluginStates.page;
const { filterValue } = pluginStates.filter;
const { selectedDataIds } = pluginStates.select;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
const table = createTable(readable(data), {
sort: addSortBy({ disableMultiSort: true }),
pagination: addPagination(),
page: addPagination(),
filter: addTableFilter({
fn: ({ filterValue, value }) => value.includes(filterValue),
}),
Expand Down Expand Up @@ -157,7 +157,7 @@
.filter(([, hide]) => !hide)
.map(([id]) => id);
const { hasNextPage, hasPreviousPage, pageIndex } = pluginStates.pagination;
const { hasNextPage, hasPreviousPage, pageIndex } = pluginStates.page;
const { filterValue } = pluginStates.filter;
const { selectedDataIds } = pluginStates.select;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
const table = createTable(readable(data), {
sort: addSortBy({ disableMultiSort: true }),
pagination: addPagination(),
page: addPagination(),
filter: addTableFilter({
fn: ({ filterValue, value }) => value.includes(filterValue),
}),
Expand Down Expand Up @@ -151,7 +151,7 @@
.filter(([, hide]) => !hide)
.map(([id]) => id);
const { hasNextPage, hasPreviousPage, pageIndex } = pluginStates.pagination;
const { hasNextPage, hasPreviousPage, pageIndex } = pluginStates.page;
const { filterValue } = pluginStates.filter;
const { selectedDataIds } = pluginStates.select;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
const table = createTable(readable(data), {
sort: addSortBy({ disableMultiSort: true }),
pagination: addPagination(),
page: addPagination(),
filter: addTableFilter({
fn: ({ filterValue, value }) => value.includes(filterValue),
}),
Expand Down Expand Up @@ -157,7 +157,7 @@
.filter(([, hide]) => !hide)
.map(([id]) => id);
const { hasNextPage, hasPreviousPage, pageIndex } = pluginStates.pagination;
const { hasNextPage, hasPreviousPage, pageIndex } = pluginStates.page;
const { filterValue } = pluginStates.filter;
const { selectedDataIds } = pluginStates.select;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
const table = createTable(readable(data), {
sort: addSortBy({ disableMultiSort: true }),
pagination: addPagination(),
page: addPagination(),
filter: addTableFilter({
fn: ({ filterValue, value }) => value.includes(filterValue),
}),
Expand Down Expand Up @@ -146,7 +146,7 @@
.filter(([, hide]) => !hide)
.map(([id]) => id);
const { hasNextPage, hasPreviousPage, pageIndex } = pluginStates.pagination;
const { hasNextPage, hasPreviousPage, pageIndex } = pluginStates.page;
const { filterValue } = pluginStates.filter;
const { selectedDataIds } = pluginStates.select;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@
const { pageRows, pluginStates, rows } = tableModel;
const { hasNextPage, hasPreviousPage, pageIndex, pageCount, pageSize } =
pluginStates.pagination;
const { hasNextPage, hasPreviousPage, pageIndex, pageCount, pageSize } = pluginStates.page;
const { selectedDataIds } = pluginStates.select;
</script>
Expand Down

0 comments on commit 5515015

Please sign in to comment.