From 576e0f23fa992d9a5e055c16275e65ac1f65c726 Mon Sep 17 00:00:00 2001 From: Gilbert Cherrie <32444791+GilbertCherrie@users.noreply.github.com> Date: Tue, 17 Dec 2024 10:59:16 -0500 Subject: [PATCH] Merge pull request #9320 from liu-samuel/tag-list-customer-case Making tags more readable (cherry picked from commit 1f5c90e58ed582f6eb8211fb46b20474bdfc6c75) --- .../value-tags/miq-structured-list-text.jsx | 8 ++++++-- .../tests/__snapshots__/tag_group.test.js.snap | 7 +++++-- .../spec/textual_summary/tests/tag_group.test.js | 2 +- app/stylesheet/miq-structured-list.scss | 1 + 4 files changed, 13 insertions(+), 5 deletions(-) diff --git a/app/javascript/components/miq-structured-list/miq-structured-list-body/value-tags/miq-structured-list-text.jsx b/app/javascript/components/miq-structured-list/miq-structured-list-body/value-tags/miq-structured-list-text.jsx index d49b7d8e172..6bbdd870016 100644 --- a/app/javascript/components/miq-structured-list/miq-structured-list-body/value-tags/miq-structured-list-text.jsx +++ b/app/javascript/components/miq-structured-list/miq-structured-list-body/value-tags/miq-structured-list-text.jsx @@ -4,8 +4,12 @@ import classNames from 'classnames'; /** Component to print the text value inside a cell. */ const MiqStructuredListText = ({ value }) => { - const text = (value === null || value === undefined ? '' : String(value)); - + let text; + if (Array.isArray(value)) { + text = value.join('\n'); + } else { + text = (value === null || value === undefined ? '' : String(value)); + } return (