patternfly / react-log-viewer

MIT License
17 stars 14 forks source link

Add retain white-space characters prop to LogViewer #41

Closed raspbeep closed 12 months ago

raspbeep commented 12 months ago

The LogViewer component currently retains whitespaces only if the isTextWrapped prop is true. However, this is not always desired in cases when displaying long lines with multiple consecutive white-space characters e.g. tables.

The white-space character retention is controlled via a css property white-space and the added retainWhitespace prop can be used disable the addition of the white-space: nowrap; css property.

The white-space characters collapsing mangles tables in the Openshift Console UI and enabling the text wrap is not always desirable in case of logs with lengthy lines.

Fixes: #20