Skip to content

The open alternative to Salesforce, designed for AI.

fix-on-dropdown-menu-width (#1181)

Charles Bochet8cf6db8c6524
diff --git a/front/src/modules/ui/dropdown/components/DropdownMenu.tsx b/front/src/modules/ui/dropdown/components/DropdownMenu.tsx
index 12e09ff9176..6b89587065b 100644
--- a/front/src/modules/ui/dropdown/components/DropdownMenu.tsx
+++ b/front/src/modules/ui/dropdown/components/DropdownMenu.tsx
@@ -18,5 +18,5 @@ export const DropdownMenu = styled.div<{
overflow: hidden;
- width: ${({ width }) => width ?? 160}px;
+ width: ${({ width }) => (width && width > 160 ? width : 160)}px;
`;
diff --git a/front/src/modules/ui/table/components/EntityTable.tsx b/front/src/modules/ui/table/components/EntityTable.tsx
index 66cc7656fd7..d3a07d3938e 100644
--- a/front/src/modules/ui/table/components/EntityTable.tsx
+++ b/front/src/modules/ui/table/components/EntityTable.tsx
@@ -28,6 +28,8 @@ const StyledTable = styled.table`
margin-right: ${({ theme }) => theme.table.horizontalCellMargin};
table-layout: fixed;
+ width: calc(100% - ${({ theme }) => theme.table.horizontalCellMargin} * 2);
+
th {
border: 1px solid ${({ theme }) => theme.border.color.light};
border-collapse: collapse;
diff --git a/front/src/modules/ui/tooltip/OverflowingTextWithTooltip.tsx b/front/src/modules/ui/tooltip/OverflowingTextWithTooltip.tsx
index b00808284f5..f19b0436bf9 100644
--- a/front/src/modules/ui/tooltip/OverflowingTextWithTooltip.tsx
+++ b/front/src/modules/ui/tooltip/OverflowingTextWithTooltip.tsx
@@ -47,11 +47,6 @@ export function OverflowingTextWithTooltip({
event.preventDefault();
}
- function handleTooltipMouseUp(event: React.MouseEvent<HTMLDivElement>) {
- event.stopPropagation();
- event.preventDefault();
- }
-
return (
<>
<StyledOverflowingText
@@ -64,12 +59,11 @@ export function OverflowingTextWithTooltip({
</StyledOverflowingText>
{isTitleOverflowing &&
createPortal(
- <div onMouseUp={handleTooltipMouseUp} onClick={handleTooltipClick}>
+ <div onClick={handleTooltipClick}>
<AppTooltip
anchorSelect={`#${textElementId}`}
content={text ?? ''}
- clickable
- delayHide={100}
+ delayHide={0}
offset={5}
noArrow
place="bottom"