mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Fixed a couple of SonarQube issues.
This commit is contained in:
committed by
Akshay Joshi
parent
43022b7aa2
commit
b128ba2f57
@@ -41,8 +41,7 @@ const useStyles = makeStyles((theme)=>({
|
||||
},
|
||||
}));
|
||||
|
||||
function getRowClassname(data, collapseParent) {
|
||||
const classes = useStyles();
|
||||
function getRowClassname(classes, data, collapseParent) {
|
||||
let className = [];
|
||||
if(data['Plans']?.length > 0) {
|
||||
className.push(classes.collapsible);
|
||||
@@ -75,7 +74,7 @@ function ExplainRow({row, show, activeExId, setActiveExId, collapsedExId, toggle
|
||||
const exId = `pga_ex_${data['level'].join('_')}`;
|
||||
const parentExId = `pga_ex_${data['parent_node']}`;
|
||||
const collapsed = collapsedExId.findIndex((v)=>parentExId.startsWith(v)) > -1;
|
||||
const className = getRowClassname(data, collapsedExId.indexOf(exId) > -1);
|
||||
const className = getRowClassname(classes, data, collapsedExId.indexOf(exId) > -1);
|
||||
let onRowClick = (e)=>{
|
||||
toggleCollapseExId(e.currentTarget.getAttribute('data-ex-id'), data['Plans']?.length);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user