mirror of
https://github.com/gosticks/react-table.git
synced 2026-08-13 05:20:26 +00:00
v7.0.0-rc.2
This commit is contained in:
@@ -102,7 +102,7 @@ function Table({ columns, data, updateMyData, skipPageReset }) {
|
||||
data,
|
||||
defaultColumn,
|
||||
// use the skipPageReset option to disable page resetting temporarily
|
||||
getResetPageDeps: skipPageReset ? false : undefined,
|
||||
autoResetPage: !skipPageReset,
|
||||
// updateMyData isn't part of the API, but
|
||||
// anything we put into these options will
|
||||
// automatically be available on the instance.
|
||||
|
||||
@@ -8087,10 +8087,10 @@ react-scripts@3.0.1:
|
||||
optionalDependencies:
|
||||
fsevents "2.0.6"
|
||||
|
||||
react-table@next:
|
||||
version "7.0.0-alpha.7"
|
||||
resolved "https://registry.yarnpkg.com/react-table/-/react-table-7.0.0-alpha.7.tgz#0cb6da6f32adb397e68505b7cdd4880d15d73017"
|
||||
integrity sha512-oXE9RRkE2CFk1OloNCSTPQ9qxOdujgkCoW5b/srbJsBog/ySkWuozBTQkxH1wGNmnSxGyTrTxJqXdXPQam7VAw==
|
||||
react-table@latest:
|
||||
version "7.0.0-rc.1"
|
||||
resolved "https://registry.yarnpkg.com/react-table/-/react-table-7.0.0-rc.1.tgz#33f61b904d246d862a46a05ac4d8eda6343ea83b"
|
||||
integrity sha512-tAuZg+TY64UUgBPRts/q+0JguGZpliYdoQZl7lAnLAQ/reU/5c04sCx54QcpH7n/PYVHMJEYkIU0ito8ZZ011w==
|
||||
|
||||
react@^16.8.6:
|
||||
version "16.8.6"
|
||||
|
||||
@@ -306,7 +306,7 @@ function Table({ columns, data, updateMyData, skipPageReset }) {
|
||||
updateMyData,
|
||||
// We also need to pass this so the page doesn't change
|
||||
// when we edit the data, undefined means using the default
|
||||
getResetPageDeps: skipPageReset ? false : undefined,
|
||||
autoResetPage: !skipPageReset,
|
||||
},
|
||||
useGroupBy,
|
||||
useFilters,
|
||||
|
||||
@@ -303,9 +303,9 @@ function Table({ columns, data, updateMyData, skipReset }) {
|
||||
// cell renderer!
|
||||
updateMyData,
|
||||
// We also need to pass this so the page doesn't change
|
||||
// when we edit the data. Undefined tells it to use the default
|
||||
getResetPageDeps: skipReset ? false : undefined,
|
||||
getResetSelectedRowPathsDeps: skipReset ? false : undefined,
|
||||
// when we edit the data.
|
||||
autoResetPage: !skipReset,
|
||||
autoResetSelectedRows: !skipReset,
|
||||
},
|
||||
useFilters,
|
||||
useGroupBy,
|
||||
|
||||
@@ -77,8 +77,6 @@ function Table({
|
||||
usePagination
|
||||
)
|
||||
|
||||
// Now we can get our table state from the hoisted table state tuple
|
||||
|
||||
// Listen for changes in pagination and use the state to fetch our new data
|
||||
React.useEffect(() => {
|
||||
fetchData({ pageIndex, pageSize })
|
||||
@@ -107,7 +105,16 @@ function Table({
|
||||
{headerGroups.map(headerGroup => (
|
||||
<tr {...headerGroup.getHeaderGroupProps()}>
|
||||
{headerGroup.headers.map(column => (
|
||||
<th {...column.getHeaderProps()}>{column.render('Header')}</th>
|
||||
<th {...column.getHeaderProps(column.getSortByToggleProps())}>
|
||||
{column.render('Header')}
|
||||
<span>
|
||||
{column.isSorted
|
||||
? column.isSortedDesc
|
||||
? ' 🔽'
|
||||
: ' 🔼'
|
||||
: ''}
|
||||
</span>
|
||||
</th>
|
||||
))}
|
||||
</tr>
|
||||
))}
|
||||
|
||||
@@ -8087,10 +8087,10 @@ react-scripts@3.0.1:
|
||||
optionalDependencies:
|
||||
fsevents "2.0.6"
|
||||
|
||||
react-table@next:
|
||||
version "7.0.0-alpha.7"
|
||||
resolved "https://registry.yarnpkg.com/react-table/-/react-table-7.0.0-alpha.7.tgz#0cb6da6f32adb397e68505b7cdd4880d15d73017"
|
||||
integrity sha512-oXE9RRkE2CFk1OloNCSTPQ9qxOdujgkCoW5b/srbJsBog/ySkWuozBTQkxH1wGNmnSxGyTrTxJqXdXPQam7VAw==
|
||||
react-table@latest:
|
||||
version "7.0.0-rc.1"
|
||||
resolved "https://registry.yarnpkg.com/react-table/-/react-table-7.0.0-rc.1.tgz#33f61b904d246d862a46a05ac4d8eda6343ea83b"
|
||||
integrity sha512-tAuZg+TY64UUgBPRts/q+0JguGZpliYdoQZl7lAnLAQ/reU/5c04sCx54QcpH7n/PYVHMJEYkIU0ito8ZZ011w==
|
||||
|
||||
react@^16.8.6:
|
||||
version "16.8.6"
|
||||
|
||||
@@ -62,7 +62,6 @@ function Table({ columns, data }) {
|
||||
columns,
|
||||
data,
|
||||
initialState: { pageIndex: 2 },
|
||||
debug: true,
|
||||
},
|
||||
usePagination
|
||||
)
|
||||
|
||||
@@ -8087,10 +8087,10 @@ react-scripts@3.0.1:
|
||||
optionalDependencies:
|
||||
fsevents "2.0.6"
|
||||
|
||||
react-table@next:
|
||||
version "7.0.0-alpha.7"
|
||||
resolved "https://registry.yarnpkg.com/react-table/-/react-table-7.0.0-alpha.7.tgz#0cb6da6f32adb397e68505b7cdd4880d15d73017"
|
||||
integrity sha512-oXE9RRkE2CFk1OloNCSTPQ9qxOdujgkCoW5b/srbJsBog/ySkWuozBTQkxH1wGNmnSxGyTrTxJqXdXPQam7VAw==
|
||||
react-table@latest:
|
||||
version "7.0.0-rc.1"
|
||||
resolved "https://registry.yarnpkg.com/react-table/-/react-table-7.0.0-rc.1.tgz#33f61b904d246d862a46a05ac4d8eda6343ea83b"
|
||||
integrity sha512-tAuZg+TY64UUgBPRts/q+0JguGZpliYdoQZl7lAnLAQ/reU/5c04sCx54QcpH7n/PYVHMJEYkIU0ito8ZZ011w==
|
||||
|
||||
react@^16.8.6:
|
||||
version "16.8.6"
|
||||
|
||||
@@ -47,7 +47,6 @@ function Table({ columns, data }) {
|
||||
{
|
||||
columns,
|
||||
data,
|
||||
debug: true,
|
||||
},
|
||||
useRowSelect
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user