mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Added the ability to resize columns on dashboard tables. Fixes #7364
This commit is contained in:
committed by
Akshay Joshi
parent
5e0dfff42a
commit
11cfea3860
@@ -291,6 +291,7 @@ export default function PgTable({ columns, data, isSelectRow, caveTable=true, ..
|
||||
// Let's make a column for selection
|
||||
{
|
||||
id: 'selection',
|
||||
resizable: false,
|
||||
// The header can use the table's getToggleAllRowsSelectedProps method
|
||||
// to render a checkbox
|
||||
Header: ({ getToggleAllRowsSelectedProps, toggleRowSelected, isAllRowsSelected, rows }) => {
|
||||
@@ -343,11 +344,6 @@ export default function PgTable({ columns, data, isSelectRow, caveTable=true, ..
|
||||
return [...CLOUMNS];
|
||||
}
|
||||
});
|
||||
hooks.useInstanceBeforeDimensions.push(({ headerGroups }) => {
|
||||
// fix the parent group of the selection button to not be resizable
|
||||
const selectionGroupHeader = headerGroups[0].headers[0];
|
||||
selectionGroupHeader.resizable = false;
|
||||
});
|
||||
}
|
||||
);
|
||||
|
||||
@@ -486,13 +482,13 @@ export default function PgTable({ columns, data, isSelectRow, caveTable=true, ..
|
||||
: ' 🔼'
|
||||
: ''}
|
||||
</span>
|
||||
{column.resizable && (
|
||||
<div
|
||||
{...column.getResizerProps()}
|
||||
className={classes.resizer}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
{column.resizable && (
|
||||
<div
|
||||
{...column.getResizerProps()}
|
||||
className={classes.resizer}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user