adding some delay for tooltip (#9339)
tooltips are currently instantaneous. let's add some delay for better user experience After investigation, it looks like the open property prevents delays from happening. Swithcing to hidden property See https://discord.com/channels/1130383047699738754/1324678408684306486
This commit is contained in:
@ -1,3 +1,4 @@
|
||||
import { useInlineCell } from '@/object-record/record-inline-cell/hooks/useInlineCell';
|
||||
import { OverflowingTextWithTooltip } from 'twenty-ui';
|
||||
|
||||
type TextDisplayProps = {
|
||||
@ -5,10 +6,14 @@ type TextDisplayProps = {
|
||||
displayedMaxRows?: number;
|
||||
};
|
||||
|
||||
export const TextDisplay = ({ text, displayedMaxRows }: TextDisplayProps) => (
|
||||
<OverflowingTextWithTooltip
|
||||
text={text}
|
||||
displayedMaxRows={displayedMaxRows}
|
||||
isTooltipMultiline={true}
|
||||
/>
|
||||
);
|
||||
export const TextDisplay = ({ text, displayedMaxRows }: TextDisplayProps) => {
|
||||
const { isInlineCellInEditMode } = useInlineCell();
|
||||
return (
|
||||
<OverflowingTextWithTooltip
|
||||
text={text}
|
||||
displayedMaxRows={displayedMaxRows}
|
||||
isTooltipMultiline={true}
|
||||
hideTooltip={isInlineCellInEditMode}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
@ -144,7 +144,7 @@ export const ViewFieldsVisibilityDropdownSection = ({
|
||||
}-item-tooltip-anchor-${openToolTipIndex}`}
|
||||
place="left"
|
||||
content={fields[openToolTipIndex].infoTooltipContent}
|
||||
isOpen={true}
|
||||
hidden={false}
|
||||
/>,
|
||||
document.body,
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user