Add an option to disable table pagination WIP
This commit is contained in:
parent
5bc5cea43e
commit
4dc756398f
|
@ -23,6 +23,8 @@
|
||||||
"import/no-extraneous-dependencies": 0,
|
"import/no-extraneous-dependencies": 0,
|
||||||
"import/extensions": 0,
|
"import/extensions": 0,
|
||||||
"import/prefer-default-export": 0,
|
"import/prefer-default-export": 0,
|
||||||
|
"react/default-props-match-prop-types": ["error", { "allowRequiredDefaults": true }],
|
||||||
|
// https://github.com/yannickcr/eslint-plugin-react/issues/1593 ^
|
||||||
"jsx-a11y/label-has-for": 0,
|
"jsx-a11y/label-has-for": 0,
|
||||||
"indent": ["error", 2, { "SwitchCase": 1 }],
|
"indent": ["error", 2, { "SwitchCase": 1 }],
|
||||||
"no-console": ["error", { "allow": ["warn", "error"] }],
|
"no-console": ["error", { "allow": ["warn", "error"] }],
|
||||||
|
|
|
@ -93,7 +93,7 @@
|
||||||
"@storybook/addon-knobs": "5.1.11",
|
"@storybook/addon-knobs": "5.1.11",
|
||||||
"@storybook/addon-links": "5.1.11",
|
"@storybook/addon-links": "5.1.11",
|
||||||
"@storybook/react": "5.1.11",
|
"@storybook/react": "5.1.11",
|
||||||
"@testing-library/react": "9.1.3",
|
"@testing-library/react": "9.1.4",
|
||||||
"autoprefixer": "9.6.1",
|
"autoprefixer": "9.6.1",
|
||||||
"babel-core": "^7.0.0-bridge.0",
|
"babel-core": "^7.0.0-bridge.0",
|
||||||
"babel-eslint": "10.0.3",
|
"babel-eslint": "10.0.3",
|
||||||
|
@ -107,7 +107,7 @@
|
||||||
"detect-port": "^1.2.2",
|
"detect-port": "^1.2.2",
|
||||||
"eslint": "5.16.0",
|
"eslint": "5.16.0",
|
||||||
"eslint-config-airbnb": "18.0.1",
|
"eslint-config-airbnb": "18.0.1",
|
||||||
"eslint-plugin-flowtype": "4.2.0",
|
"eslint-plugin-flowtype": "4.3.0",
|
||||||
"eslint-plugin-import": "2.18.2",
|
"eslint-plugin-import": "2.18.2",
|
||||||
"eslint-plugin-jest": "22.16.0",
|
"eslint-plugin-jest": "22.16.0",
|
||||||
"eslint-plugin-jsx-a11y": "6.2.3",
|
"eslint-plugin-jsx-a11y": "6.2.3",
|
||||||
|
|
|
@ -20,9 +20,10 @@ type Props<K> = {
|
||||||
classes: Object,
|
classes: Object,
|
||||||
children: Function,
|
children: Function,
|
||||||
size: number,
|
size: number,
|
||||||
defaultFixed?: boolean,
|
defaultFixed: boolean,
|
||||||
defaultOrder?: 'desc' | 'asc',
|
defaultOrder: 'desc' | 'asc',
|
||||||
noBorder: boolean,
|
noBorder: boolean,
|
||||||
|
disablePagination: boolean,
|
||||||
}
|
}
|
||||||
|
|
||||||
type State = {
|
type State = {
|
||||||
|
@ -142,6 +143,7 @@ class GnoTable<K> extends React.Component<Props<K>, State> {
|
||||||
classes,
|
classes,
|
||||||
children,
|
children,
|
||||||
size,
|
size,
|
||||||
|
disablePagination,
|
||||||
defaultOrderBy,
|
defaultOrderBy,
|
||||||
defaultOrder,
|
defaultOrder,
|
||||||
defaultFixed,
|
defaultFixed,
|
||||||
|
@ -184,18 +186,20 @@ class GnoTable<K> extends React.Component<Props<K>, State> {
|
||||||
<CircularProgress size={60} />
|
<CircularProgress size={60} />
|
||||||
</Row>
|
</Row>
|
||||||
)}
|
)}
|
||||||
<TablePagination
|
{!disablePagination && (
|
||||||
component="div"
|
<TablePagination
|
||||||
count={size}
|
component="div"
|
||||||
rowsPerPage={rowsPerPage}
|
count={size}
|
||||||
rowsPerPageOptions={[5, 10, 25, 50, 100]}
|
rowsPerPage={rowsPerPage}
|
||||||
page={page}
|
rowsPerPageOptions={[5, 10, 25, 50, 100]}
|
||||||
backIconButtonProps={backProps}
|
page={page}
|
||||||
nextIconButtonProps={nextProps}
|
backIconButtonProps={backProps}
|
||||||
onChangePage={this.handleChangePage}
|
nextIconButtonProps={nextProps}
|
||||||
onChangeRowsPerPage={this.handleChangeRowsPerPage}
|
onChangePage={this.handleChangePage}
|
||||||
classes={paginationClasses}
|
onChangeRowsPerPage={this.handleChangeRowsPerPage}
|
||||||
/>
|
classes={paginationClasses}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -203,6 +207,7 @@ class GnoTable<K> extends React.Component<Props<K>, State> {
|
||||||
|
|
||||||
GnoTable.defaultProps = {
|
GnoTable.defaultProps = {
|
||||||
defaultOrder: 'asc',
|
defaultOrder: 'asc',
|
||||||
|
disablePagination: false,
|
||||||
}
|
}
|
||||||
|
|
||||||
export default withStyles(styles)(GnoTable)
|
export default withStyles(styles)(GnoTable)
|
||||||
|
|
|
@ -150,6 +150,7 @@ class ManageOwners extends React.Component<Props, State> {
|
||||||
columns={columns}
|
columns={columns}
|
||||||
data={ownerData}
|
data={ownerData}
|
||||||
size={ownerData.size}
|
size={ownerData.size}
|
||||||
|
disablePagination
|
||||||
defaultFixed
|
defaultFixed
|
||||||
noBorder
|
noBorder
|
||||||
>
|
>
|
||||||
|
|
|
@ -21,7 +21,7 @@ type Props = {
|
||||||
classes: Object,
|
classes: Object,
|
||||||
createTransaction: Function,
|
createTransaction: Function,
|
||||||
safeAddress: string,
|
safeAddress: string,
|
||||||
granted: Boolean,
|
granted: boolean,
|
||||||
}
|
}
|
||||||
|
|
||||||
const ThresholdSettings = ({
|
const ThresholdSettings = ({
|
||||||
|
|
36
yarn.lock
36
yarn.lock
|
@ -2255,13 +2255,14 @@
|
||||||
dependencies:
|
dependencies:
|
||||||
defer-to-connect "^1.0.1"
|
defer-to-connect "^1.0.1"
|
||||||
|
|
||||||
"@testing-library/dom@^6.0.0":
|
"@testing-library/dom@^6.1.0":
|
||||||
version "6.0.0"
|
version "6.1.0"
|
||||||
resolved "https://registry.yarnpkg.com/@testing-library/dom/-/dom-6.0.0.tgz#34e28e69e49bd6347fc64a5dde4c4f9aabbd17d3"
|
resolved "https://registry.yarnpkg.com/@testing-library/dom/-/dom-6.1.0.tgz#8d5a954158e81ecd7c994907f4ec240296ed823b"
|
||||||
integrity sha512-B5XTz3uMsbqbdR9CZlnwpZjTE3fCWuqRkz/zvDc2Ej/vuHmTM0Ur2v0XPwr7usWfGIBsahEK5HL1E91+4IFiBg==
|
integrity sha512-qivqFvnbVIH3DyArFofEU/jlOhkGIioIemOy9A9M/NQTpPyDDQmtVkAfoB18RKN581f0s/RJMRBbq9WfMIhFTw==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@babel/runtime" "^7.5.5"
|
"@babel/runtime" "^7.5.5"
|
||||||
"@sheerun/mutationobserver-shim" "^0.3.2"
|
"@sheerun/mutationobserver-shim" "^0.3.2"
|
||||||
|
"@types/testing-library__dom" "^6.0.0"
|
||||||
aria-query "3.0.0"
|
aria-query "3.0.0"
|
||||||
pretty-format "^24.8.0"
|
pretty-format "^24.8.0"
|
||||||
wait-for-expect "^1.3.0"
|
wait-for-expect "^1.3.0"
|
||||||
|
@ -2281,13 +2282,13 @@
|
||||||
pretty-format "^24.0.0"
|
pretty-format "^24.0.0"
|
||||||
redent "^3.0.0"
|
redent "^3.0.0"
|
||||||
|
|
||||||
"@testing-library/react@9.1.3":
|
"@testing-library/react@9.1.4":
|
||||||
version "9.1.3"
|
version "9.1.4"
|
||||||
resolved "https://registry.yarnpkg.com/@testing-library/react/-/react-9.1.3.tgz#3fb495227322ea36cd817532441dabb552e0d6ce"
|
resolved "https://registry.yarnpkg.com/@testing-library/react/-/react-9.1.4.tgz#4cc1a228a944c0f468ee501e7da1651d8bbd9902"
|
||||||
integrity sha512-qFVo6TsEbpEFpOmKjIxMHDujOKVdvVpcYFcUfJeWBqMO8eja5pN9SZnt6W6AzW3a1MRvRfw3X0Fhx3eXnBJxjA==
|
integrity sha512-fQ/PXZoLcmnS1W5ZiM3P7XBy2x6Hm9cJAT/ZDuZKzJ1fS1rN3j31p7ReAqUe3N1kJ46sNot0n1oiGbz7FPU+FA==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@babel/runtime" "^7.5.5"
|
"@babel/runtime" "^7.5.5"
|
||||||
"@testing-library/dom" "^6.0.0"
|
"@testing-library/dom" "^6.1.0"
|
||||||
"@types/testing-library__react" "^9.1.0"
|
"@types/testing-library__react" "^9.1.0"
|
||||||
|
|
||||||
"@truffle/blockchain-utils@^0.0.11":
|
"@truffle/blockchain-utils@^0.0.11":
|
||||||
|
@ -2462,6 +2463,13 @@
|
||||||
dependencies:
|
dependencies:
|
||||||
"@types/pretty-format" "*"
|
"@types/pretty-format" "*"
|
||||||
|
|
||||||
|
"@types/testing-library__dom@^6.0.0":
|
||||||
|
version "6.0.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/@types/testing-library__dom/-/testing-library__dom-6.0.2.tgz#1e40c5f12671b98e86706f6c9ba55eaab3461edc"
|
||||||
|
integrity sha512-p5Jjm2kaHpee2rMartE3F2vg4rosMoAc1KVr4+WPz1TOc4B8A6EO5oLJUZvuRyiT3pFy/WO77kn40qp51DF3Sg==
|
||||||
|
dependencies:
|
||||||
|
pretty-format "^24.3.0"
|
||||||
|
|
||||||
"@types/testing-library__react@^9.1.0":
|
"@types/testing-library__react@^9.1.0":
|
||||||
version "9.1.1"
|
version "9.1.1"
|
||||||
resolved "https://registry.yarnpkg.com/@types/testing-library__react/-/testing-library__react-9.1.1.tgz#4bcb8bba54b07fbb6c084f2f00e7f9410e587c10"
|
resolved "https://registry.yarnpkg.com/@types/testing-library__react/-/testing-library__react-9.1.1.tgz#4bcb8bba54b07fbb6c084f2f00e7f9410e587c10"
|
||||||
|
@ -6997,10 +7005,10 @@ eslint-module-utils@^2.4.0:
|
||||||
debug "^2.6.8"
|
debug "^2.6.8"
|
||||||
pkg-dir "^2.0.0"
|
pkg-dir "^2.0.0"
|
||||||
|
|
||||||
eslint-plugin-flowtype@4.2.0:
|
eslint-plugin-flowtype@4.3.0:
|
||||||
version "4.2.0"
|
version "4.3.0"
|
||||||
resolved "https://registry.yarnpkg.com/eslint-plugin-flowtype/-/eslint-plugin-flowtype-4.2.0.tgz#a89ac991eef6753226eb8871261e266645aca4b9"
|
resolved "https://registry.yarnpkg.com/eslint-plugin-flowtype/-/eslint-plugin-flowtype-4.3.0.tgz#06d0837ac341caf369e7e6dbb112dd7fd21acf17"
|
||||||
integrity sha512-mqf6AbQCP6N8Bk+ryXYwxt6sj3RT7i3kt8JOOx7WOQNlZtsLxqvnkXRRrToFHcN52E5W9c/p3UfNxCMsfENIJA==
|
integrity sha512-elvqoadMHnYqSYN1YXn02DR7SFW8Kc2CLe8na3m2GdQPQhIY+BgCd2quVJ1AbW3aO0zcyE9loVJ7Szy8A/xlMA==
|
||||||
dependencies:
|
dependencies:
|
||||||
lodash "^4.17.15"
|
lodash "^4.17.15"
|
||||||
|
|
||||||
|
@ -13860,7 +13868,7 @@ pretty-format@^24.0.0, pretty-format@^24.8.0:
|
||||||
ansi-styles "^3.2.0"
|
ansi-styles "^3.2.0"
|
||||||
react-is "^16.8.4"
|
react-is "^16.8.4"
|
||||||
|
|
||||||
pretty-format@^24.9.0:
|
pretty-format@^24.3.0, pretty-format@^24.9.0:
|
||||||
version "24.9.0"
|
version "24.9.0"
|
||||||
resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-24.9.0.tgz#12fac31b37019a4eea3c11aa9a959eb7628aa7c9"
|
resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-24.9.0.tgz#12fac31b37019a4eea3c11aa9a959eb7628aa7c9"
|
||||||
integrity sha512-00ZMZUiHaJrNfk33guavqgvfJS30sLYf0f8+Srklv0AMPodGGHcoHgksZ3OThYnIvOd+8yMCn0YiEOogjlgsnA==
|
integrity sha512-00ZMZUiHaJrNfk33guavqgvfJS30sLYf0f8+Srklv0AMPodGGHcoHgksZ3OThYnIvOd+8yMCn0YiEOogjlgsnA==
|
||||||
|
|
Loading…
Reference in New Issue