Ensure that the browser path column in the search object shows the complete path. #5458

This commit is contained in:
Nikhil Mohite
2022-11-03 11:08:31 +05:30
committed by GitHub
parent fc8eb888e4
commit 5f911ed0d8

View File

@@ -77,6 +77,10 @@ const useStyles = makeStyles((theme)=>({
color: `${theme.otherVars.textMuted} !important`,
cursor: 'default !important',
},
textWrap: {
textOverflow: 'ellipsis',
overflow: 'hidden'
}
}));
function ObjectNameFormatter({row}) {
@@ -97,14 +101,23 @@ ObjectNameFormatter.propTypes = {
row: PropTypes.object,
};
function TypePathFormatter({row}) {
function TypePathFormatter({row, column}) {
const classes = useStyles();
let val = '';
if(column.key == 'type') {
val = row.type_label;
} else if(column.key == 'path') {
val = row.path;
}
return (
<Box className={row.show_node ? '' : classes.cellMuted}>{row.type_label}</Box>
<Box className={clsx(classes.textWrap, row.show_node ? '' : classes.cellMuted)}>{val}</Box>
);
}
TypePathFormatter.propTypes = {
row: PropTypes.object,
column: PropTypes.object,
};