diff --git a/src/core_modules/capture-ui/FlatList/FlatList.component.js b/src/core_modules/capture-ui/FlatList/FlatList.component.js index 491813b866..28a5753e60 100644 --- a/src/core_modules/capture-ui/FlatList/FlatList.component.js +++ b/src/core_modules/capture-ui/FlatList/FlatList.component.js @@ -5,9 +5,16 @@ import { colors, spacersNum } from '@dhis2/ui'; import { withStyles } from '@material-ui/core'; import type { Props } from './flatList.types'; +const itemStyles = { + overflow: 'hidden', + wordWrap: 'break-word', + textOverflow: 'ellipsis', + hyphens: 'auto', +}; + const styles = { itemRow: { - borderBottom: `1px solid${colors.grey300}`, + borderBottom: `1px solid ${colors.grey300}`, display: 'flex', fontSize: '14px', lineHeight: '19px', @@ -15,14 +22,17 @@ const styles = { '&.isLastItem': { borderBottomWidth: 0, }, - gap: '5px', }, itemKey: { - flex: '50%', + flex: '0 0 auto', + width: '128px', color: colors.grey600, + marginRight: '20px', + ...itemStyles, }, itemValue: { - flex: '50%', + flex: 1, + ...itemStyles, }, }; @@ -33,7 +43,7 @@ const FlatListPlain = ({ list, classes, dataTest }: Props) => { key={item.reactKey} className={cx(classes.itemRow, { isLastItem: item.reactKey === lastItemKey })} > -