Skip to content

Commit d868ffb

Browse files
committed
style selected option markup
1 parent 2ae7bad commit d868ffb

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

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

Lines changed: 2 additions & 3 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>
@@ -323,7 +323,6 @@ const TlsDetails = (props: Props) => {
323323
<EuiSuperSelect
324324
placeholder="Select certificate"
325325
valueOfSelected={formik.values.selectedTlsClientCertId}
326-
className={styles.selectWithLongTextSupport}
327326
options={optionsCertsClient}
328327
onChange={(value) => {
329328
formik.setFieldValue('selectedTlsClientCertId', value)

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,8 @@
167167
}
168168
}
169169

170-
.selectWithLongTextSupport {
171-
display: block !important;
170+
.selectedOptionWithLongTextSupport {
171+
overflow: hidden;
172+
text-overflow: ellipsis;
173+
padding-right: 1.5rem;
172174
}

0 commit comments

Comments
 (0)