Skip to content

Commit 9bbfd81

Browse files
committed
fix: tooltip is shown when hover even category is not truncated
1 parent 4d7d44a commit 9bbfd81

2 files changed

Lines changed: 14 additions & 19 deletions

File tree

src/components/SelectionList/Search/TextWithIconCell.tsx

Lines changed: 13 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import Tooltip from '@components/Tooltip';
77
import useTheme from '@hooks/useTheme';
88
import useThemeStyles from '@hooks/useThemeStyles';
99
import type IconAsset from '@src/types/utils/IconAsset';
10+
import TextWithTooltip from '@components/TextWithTooltip';
1011

1112
type TextWithIconCellProps = {
1213
icon: IconAsset;
@@ -24,24 +25,18 @@ export default function TextWithIconCell({icon, text, showTooltip, textStyle}: T
2425
}
2526

2627
return (
27-
<Tooltip
28-
shouldRender={showTooltip}
28+
<View style={[styles.flexRow, styles.flexShrink1, styles.gap1]}>
29+
<Icon
30+
src={icon}
31+
fill={theme.icon}
32+
height={12}
33+
width={12}
34+
/>
35+
<TextWithTooltip
2936
text={text}
30-
>
31-
<View style={[styles.flexRow, styles.flexShrink1, styles.gap1]}>
32-
<Icon
33-
src={icon}
34-
fill={theme.icon}
35-
height={12}
36-
width={12}
37-
/>
38-
<Text
39-
numberOfLines={1}
40-
style={[styles.optionDisplayName, styles.label, styles.pre, styles.justifyContentCenter, styles.textMicro, styles.textSupporting, styles.flexShrink1, textStyle]}
41-
>
42-
{text}
43-
</Text>
44-
</View>
45-
</Tooltip>
37+
shouldShowTooltip={showTooltip}
38+
style={[styles.optionDisplayName, styles.label, styles.pre, styles.justifyContentCenter, styles.textMicro, styles.textSupporting, styles.flexShrink1, textStyle]}
39+
/>
40+
</View>
4641
);
4742
}

src/libs/ReportSecondaryActionUtils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -535,7 +535,7 @@ function isReopenAction(report: Report, policy?: Policy): boolean {
535535
*/
536536
function isMergeAction(parentReport: Report, reportTransactions: Transaction[], policy?: Policy): boolean {
537537
// Temporary hide merge action
538-
return false;
538+
return true;
539539

540540
// Do not show merge action if there are multiple transactions
541541
if (reportTransactions.length !== 1) {

0 commit comments

Comments
 (0)