fix(ui): render column type max 3 lines and ellipsis (#19046)

This commit is contained in:
Chirag Madlani 2024-12-13 19:11:03 +05:30 committed by GitHub
parent cab9245b4d
commit ea5a246a44
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -23,7 +23,6 @@ import {
isUndefined, isUndefined,
set, set,
sortBy, sortBy,
toLower,
uniqBy, uniqBy,
} from 'lodash'; } from 'lodash';
import { EntityTags, TagFilterOptions } from 'Models'; import { EntityTags, TagFilterOptions } from 'Models';
@ -246,15 +245,12 @@ const SchemaTable = ({
return NO_DATA_PLACEHOLDER; return NO_DATA_PLACEHOLDER;
} }
return isReadOnly || return (
(displayValue && displayValue.length < 25 && !isReadOnly) ? ( <Typography.Paragraph
toLower(displayValue) className="cursor-pointer"
) : ( ellipsis={{ tooltip: displayValue, rows: 3 }}>
<Tooltip title={toLower(displayValue)}> {displayValue}
<Typography.Text ellipsis className="cursor-pointer"> </Typography.Paragraph>
{displayValue}
</Typography.Text>
</Tooltip>
); );
}; };
@ -419,7 +415,6 @@ const SchemaTable = ({
dataIndex: 'dataTypeDisplay', dataIndex: 'dataTypeDisplay',
key: 'dataTypeDisplay', key: 'dataTypeDisplay',
accessor: 'dataTypeDisplay', accessor: 'dataTypeDisplay',
ellipsis: true,
width: 150, width: 150,
render: renderDataTypeDisplay, render: renderDataTypeDisplay,
}, },