mirror of
https://github.com/strapi/strapi.git
synced 2025-09-09 08:39:45 +00:00
fixed ellipsis text in cm lv table
This commit is contained in:
parent
2f3f5790b3
commit
07c02493e4
@ -1,11 +1,16 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
|
import styled from 'styled-components';
|
||||||
import { Text } from '@strapi/parts/Text';
|
import { Text } from '@strapi/parts/Text';
|
||||||
import Media from './Media';
|
import Media from './Media';
|
||||||
import MultipleMedias from './MultipleMedias';
|
import MultipleMedias from './MultipleMedias';
|
||||||
import Relation from './Relation';
|
import Relation from './Relation';
|
||||||
import CellValue from './CellValue';
|
import CellValue from './CellValue';
|
||||||
|
|
||||||
|
const TextMaxWidth = styled(Text)`
|
||||||
|
max-width: 300px;
|
||||||
|
`;
|
||||||
|
|
||||||
const CellContent = ({ content, fieldSchema, metadatas, name, queryInfos, rowId }) => {
|
const CellContent = ({ content, fieldSchema, metadatas, name, queryInfos, rowId }) => {
|
||||||
if (content === null || content === undefined) {
|
if (content === null || content === undefined) {
|
||||||
return <Text textColor="neutral800">-</Text>;
|
return <Text textColor="neutral800">-</Text>;
|
||||||
@ -33,9 +38,9 @@ const CellContent = ({ content, fieldSchema, metadatas, name, queryInfos, rowId
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Text textColor="neutral800">
|
<TextMaxWidth ellipsis textColor="neutral800">
|
||||||
<CellValue type={fieldSchema.type} value={content} />
|
<CellValue type={fieldSchema.type} value={content} />
|
||||||
</Text>
|
</TextMaxWidth>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -672,7 +672,6 @@ describe('Admin | containers | RoleEditPage', () => {
|
|||||||
novalidate=""
|
novalidate=""
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
class=""
|
|
||||||
style="height: 0px;"
|
style="height: 0px;"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
|
Loading…
x
Reference in New Issue
Block a user