Compare commits
3
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
00e5484f2e | ||
|
|
ac07abea07 | ||
|
|
54e81cca80 |
+1
-1
@@ -40,7 +40,7 @@
|
||||
"@cosmjs/stargate": "^0.32.1",
|
||||
"@cosmjs/tendermint-rpc": "^0.32.1",
|
||||
"@dydxprotocol/v4-abacus": "^1.2.5",
|
||||
"@dydxprotocol/v4-client-js": "^1.0.14",
|
||||
"@dydxprotocol/v4-client-js": "^1.0.17",
|
||||
"@dydxprotocol/v4-localization": "^1.1.11",
|
||||
"@ethersproject/providers": "^5.7.2",
|
||||
"@js-joda/core": "^5.5.3",
|
||||
|
||||
Generated
+4
-4
@@ -30,8 +30,8 @@ dependencies:
|
||||
specifier: ^1.2.5
|
||||
version: 1.2.5
|
||||
'@dydxprotocol/v4-client-js':
|
||||
specifier: ^1.0.14
|
||||
version: 1.0.14
|
||||
specifier: ^1.0.17
|
||||
version: 1.0.17
|
||||
'@dydxprotocol/v4-localization':
|
||||
specifier: ^1.1.11
|
||||
version: 1.1.11
|
||||
@@ -1090,8 +1090,8 @@ packages:
|
||||
resolution: {integrity: sha512-pB3Fv1bzJRUDp29kAN61daZ34gTSGrSTNh+/AP3TUB63/Q/gaXQVBf91xVcso4Hw23xM3FwIcrRK0cvOSWgXKg==}
|
||||
dev: false
|
||||
|
||||
/@dydxprotocol/v4-client-js@1.0.14:
|
||||
resolution: {integrity: sha512-nIjj9OKuXb3n3rrihDPkBE6OIBxXNB7gf0NMsrG1Pc9O7M0yjpitTUgnfIzplf0XMrtmozWRYZhlLgBfJcIbBg==}
|
||||
/@dydxprotocol/v4-client-js@1.0.17:
|
||||
resolution: {integrity: sha512-PbTKbzcS7VapuFRofkirUxkF9ThNS2tWYyr0asFOMUfebsQWMvTC1sYC/s1NZIiBeq3cFz9vKdZFbfsKi7Z1bw==}
|
||||
dependencies:
|
||||
'@cosmjs/amino': 0.32.2
|
||||
'@cosmjs/encoding': 0.32.2
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"apps": {
|
||||
"ios": {
|
||||
"scheme": "dydx_t_v4"
|
||||
"scheme": "dydx-t-v4"
|
||||
}
|
||||
},
|
||||
"deployments": {
|
||||
|
||||
@@ -125,7 +125,7 @@ export const Table = <TableRowData extends object, TableRowKey extends Key>({
|
||||
selectionMode = 'single',
|
||||
selectionBehavior = 'toggle',
|
||||
slotEmpty,
|
||||
initialNumRowsToShow = data.length,
|
||||
initialNumRowsToShow,
|
||||
// shouldRowRender,
|
||||
|
||||
// collection,
|
||||
@@ -142,6 +142,7 @@ export const Table = <TableRowData extends object, TableRowKey extends Key>({
|
||||
}: ElementProps<TableRowData, TableRowKey> & StyleProps) => {
|
||||
const [selectedKeys, setSelectedKeys] = useState(new Set<TableRowKey>());
|
||||
const [numRowsToShow, setNumRowsToShow] = useState(initialNumRowsToShow);
|
||||
const enableViewMore = numRowsToShow !== undefined;
|
||||
|
||||
const currentBreakpoints = useBreakpoints();
|
||||
const shownColumns = columns.filter(
|
||||
@@ -217,7 +218,7 @@ export const Table = <TableRowData extends object, TableRowKey extends Key>({
|
||||
}
|
||||
numColumns={shownColumns.length}
|
||||
onViewMoreClick={
|
||||
numRowsToShow !== undefined && numRowsToShow < data.length
|
||||
enableViewMore && numRowsToShow < data.length
|
||||
? () => setNumRowsToShow(data.length)
|
||||
: undefined
|
||||
}
|
||||
@@ -245,7 +246,7 @@ export const Table = <TableRowData extends object, TableRowKey extends Key>({
|
||||
)}
|
||||
</TableHeader>
|
||||
|
||||
<TableBody items={list.items.slice(0, numRowsToShow)}>
|
||||
<TableBody items={enableViewMore ? list.items.slice(0, numRowsToShow) : list.items}>
|
||||
{(item) => (
|
||||
<Row key={getRowKey(item)}>
|
||||
{(columnKey) => (
|
||||
@@ -982,4 +983,4 @@ Styled.ViewMoreButton = styled(Button)`
|
||||
width: 0.675rem;
|
||||
margin-left: 0.5ch;
|
||||
}
|
||||
`;
|
||||
`;
|
||||
|
||||
Reference in New Issue
Block a user