diff --git a/web/pgadmin/static/js/components/GrantWizard.jsx b/web/pgadmin/static/js/components/GrantWizard.jsx index 582679797..d60890f50 100644 --- a/web/pgadmin/static/js/components/GrantWizard.jsx +++ b/web/pgadmin/static/js/components/GrantWizard.jsx @@ -100,11 +100,38 @@ export default function GrantWizard({ sid, did, nodeInfo, nodeData }) { }, { Header: 'Name', - accessor: 'name', + accessor: 'name_with_args', sortble: true, resizable: true, disableGlobalFilter: false, minWidth: 280 + }, + { + Header: 'parameters', + accessor: 'proargs', + sortble: false, + resizable: false, + disableGlobalFilter: false, + minWidth: 280, + isVisible: false + }, + { + Header: 'Name', + accessor: 'name', + sortble: false, + resizable: false, + disableGlobalFilter: false, + minWidth: 280, + isVisible: false + }, + { + Header: 'ID', + accessor: 'oid', + sortble: false, + resizable: false, + disableGlobalFilter: false, + minWidth: 280, + isVisible: false } ]; var steps = ['Object Selection', 'Privilege Selection', 'Review Selection']; @@ -168,6 +195,11 @@ export default function GrantWizard({ sid, did, nodeInfo, nodeData }) { element['icon'] = { 'object_type': element.icon }; + if(element.object_type === 'Function') { + element.name_with_args = element.name + '(' + (typeof(element.proargs) != 'undefined' ? element.proargs : '') + ')'; + } else { + element.name_with_args = element.name; + } }); setTableData(data); setLoaderText(''); diff --git a/web/pgadmin/static/js/components/PgTable.jsx b/web/pgadmin/static/js/components/PgTable.jsx index ba727c114..61158072a 100644 --- a/web/pgadmin/static/js/components/PgTable.jsx +++ b/web/pgadmin/static/js/components/PgTable.jsx @@ -118,7 +118,8 @@ export default function PgTable({ columns, data, isSelectRow, ...props }) { prepareRow, selectedFlatRows, state: { selectedRowIds }, - setGlobalFilter + setGlobalFilter, + setHiddenColumns } = useTable( { columns, @@ -170,6 +171,21 @@ export default function PgTable({ columns, data, isSelectRow, ...props }) { } ); + React.useEffect(() => { + setHiddenColumns( + columns + .filter((column) => { + if (column.isVisible === undefined || columns.isVisible === true) { + return false; + } else{ + return true; + } + } + ) + .map((column) => column.accessor) + ); + }, [setHiddenColumns, columns]); + React.useEffect(() => { if (props.setSelectedRows) { props.setSelectedRows(selectedFlatRows);