fix-on-dropdown-menu-width (#1181)
This commit is contained in:
@ -18,5 +18,5 @@ export const DropdownMenu = styled.div<{
|
|||||||
|
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|
||||||
width: ${({ width }) => width ?? 160}px;
|
width: ${({ width }) => (width && width > 160 ? width : 160)}px;
|
||||||
`;
|
`;
|
||||||
|
|||||||
@ -28,6 +28,8 @@ const StyledTable = styled.table`
|
|||||||
margin-right: ${({ theme }) => theme.table.horizontalCellMargin};
|
margin-right: ${({ theme }) => theme.table.horizontalCellMargin};
|
||||||
table-layout: fixed;
|
table-layout: fixed;
|
||||||
|
|
||||||
|
width: calc(100% - ${({ theme }) => theme.table.horizontalCellMargin} * 2);
|
||||||
|
|
||||||
th {
|
th {
|
||||||
border: 1px solid ${({ theme }) => theme.border.color.light};
|
border: 1px solid ${({ theme }) => theme.border.color.light};
|
||||||
border-collapse: collapse;
|
border-collapse: collapse;
|
||||||
|
|||||||
@ -47,11 +47,6 @@ export function OverflowingTextWithTooltip({
|
|||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleTooltipMouseUp(event: React.MouseEvent<HTMLDivElement>) {
|
|
||||||
event.stopPropagation();
|
|
||||||
event.preventDefault();
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<StyledOverflowingText
|
<StyledOverflowingText
|
||||||
@ -64,12 +59,11 @@ export function OverflowingTextWithTooltip({
|
|||||||
</StyledOverflowingText>
|
</StyledOverflowingText>
|
||||||
{isTitleOverflowing &&
|
{isTitleOverflowing &&
|
||||||
createPortal(
|
createPortal(
|
||||||
<div onMouseUp={handleTooltipMouseUp} onClick={handleTooltipClick}>
|
<div onClick={handleTooltipClick}>
|
||||||
<AppTooltip
|
<AppTooltip
|
||||||
anchorSelect={`#${textElementId}`}
|
anchorSelect={`#${textElementId}`}
|
||||||
content={text ?? ''}
|
content={text ?? ''}
|
||||||
clickable
|
delayHide={0}
|
||||||
delayHide={100}
|
|
||||||
offset={5}
|
offset={5}
|
||||||
noArrow
|
noArrow
|
||||||
place="bottom"
|
place="bottom"
|
||||||
|
|||||||
Reference in New Issue
Block a user