Skip to content

Commit

Permalink
Add new line character support in Task Item comp.
Browse files Browse the repository at this point in the history
The new line character `\n` is now supported through the use of the CSS
property `white-space: pre-line`.
  • Loading branch information
Sergiu Miclea authored and Dany9966 committed Nov 16, 2023
1 parent 7be6f9d commit e05de53
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/components/modules/TransferModule/TaskItem/TaskItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ const ExceptionText = styled.div<any>`
cursor: pointer;
text-overflow: ellipsis;
overflow: hidden;
white-space: pre-line;
&:hover > span {
opacity: 1;
}
Expand All @@ -166,6 +167,7 @@ const ProgressUpdateDiv = styled.div<any>`
`;
const ProgressUpdateDate = styled.div<any>`
min-width: ${props => props.width || "auto"};
white-space: pre-line;
& > span {
margin-left: 24px;
}
Expand Down Expand Up @@ -373,9 +375,9 @@ class TaskItem extends React.Component<Props> {

renderExceptionDetails() {
const exceptionsText =
this.props.item.exception_details &&
this.props.item.exception_details.length &&
this.props.item.exception_details;
this.props.item.exception_details?.length > 0
? this.props.item.exception_details
: null;

let valueField;
if (!exceptionsText) {
Expand Down

0 comments on commit e05de53

Please sign in to comment.