Skip to content

Commit f578cd9

Browse files
Merge pull request #4222 from RedisInsight/fe/bugfix/ri-6114-super-select-long-name
RI-6114: prevent long text overlapping in SuperSelect
2 parents 0015ce4 + d868ffb commit f578cd9

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

redisinsight/ui/src/pages/home/components/form/TlsDetails.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ const TlsDetails = (props: Props) => {
9797
caCertificates?.forEach((cert) => {
9898
optionsCertsCA.push({
9999
value: cert.id,
100-
inputDisplay: cert.name,
100+
inputDisplay: <span className={styles.selectedOptionWithLongTextSupport}>{cert.name}</span>,
101101
dropdownDisplay: (
102102
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}>
103103
<div>{truncateText(cert.name, 25)}</div>
@@ -128,7 +128,7 @@ const TlsDetails = (props: Props) => {
128128
certificates?.forEach((cert) => {
129129
optionsCertsClient.push({
130130
value: `${cert.id}`,
131-
inputDisplay: cert.name,
131+
inputDisplay: <span className={styles.selectedOptionWithLongTextSupport}>{cert.name}</span>,
132132
dropdownDisplay: (
133133
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}>
134134
<div>{truncateText(cert.name, 25)}</div>

redisinsight/ui/src/pages/home/components/styles.module.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,3 +166,9 @@
166166
}
167167
}
168168
}
169+
170+
.selectedOptionWithLongTextSupport {
171+
overflow: hidden;
172+
text-overflow: ellipsis;
173+
padding-right: 1.5rem;
174+
}

0 commit comments

Comments
 (0)