Skip to content

Commit d401c51

Browse files
committed
#RI-5213, #RI-5212 - fix tooltip appearing
1 parent eb033f5 commit d401c51

File tree

2 files changed

+22
-25
lines changed

2 files changed

+22
-25
lines changed

redisinsight/ui/src/pages/browser/modules/key-details/components/string-details/string-details-table/StringDetailsTable.tsx

Lines changed: 16 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -191,28 +191,24 @@ const StringDetailsTable = (props: Props) => {
191191
/>
192192
)}
193193
{!isEditItem && (
194-
<EuiText
195-
className={styles.stringValue}
196-
onClick={() => isEditable && setIsEdit(true)}
197-
style={{ whiteSpace: 'break-spaces' }}
198-
data-testid="string-value"
194+
<EuiToolTip
195+
title={!isValid ? noEditableText : undefined}
196+
anchorClassName={styles.tooltipAnchor}
197+
className={styles.tooltip}
198+
position="top"
199+
data-testid="string-value-tooltip"
199200
>
200-
{areaValue !== ''
201-
? (isValid
201+
<EuiText
202+
className={styles.stringValue}
203+
onClick={() => isEditable && setIsEdit(true)}
204+
style={{ whiteSpace: 'break-spaces' }}
205+
data-testid="string-value"
206+
>
207+
{areaValue !== ''
202208
? value
203-
: (
204-
<EuiToolTip
205-
title={noEditableText}
206-
className={styles.tooltip}
207-
position="bottom"
208-
data-testid="string-value-tooltip"
209-
>
210-
<>{value}</>
211-
</EuiToolTip>
212-
)
213-
)
214-
: (!isLoading && (<span style={{ fontStyle: 'italic' }}>Empty</span>))}
215-
</EuiText>
209+
: (!isLoading && (<span style={{ fontStyle: 'italic' }}>Empty</span>))}
210+
</EuiText>
211+
</EuiToolTip>
216212
)}
217213
{isEditItem && (
218214
<InlineItemEditor

redisinsight/ui/src/pages/browser/modules/key-details/components/string-details/string-details-table/styles.module.scss

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,7 @@ $outer-height-mobile: 340px;
2929
overflow-y: auto;
3030
overflow-x: hidden;
3131
word-break: break-word;
32-
33-
font: inherit !important;
34-
color: inherit !important;
35-
padding: 0 !important;
36-
background: inherit !important;
32+
line-height: 1.2;
3733

3834
pre {
3935
background-color: transparent !important;
@@ -48,6 +44,11 @@ $outer-height-mobile: 340px;
4844
}
4945
}
5046

47+
.tooltipAnchor {
48+
display: inline-flex !important;
49+
height: 100%;
50+
}
51+
5152
.stringFooterBtn {
5253
&:global(.euiButton) {
5354
color: var(--euiTextSubduedColor) !important;

0 commit comments

Comments
 (0)