Fix dropdown jump effect bug on mouse over in topics list (#1875)
* fix dropdown jump effect bug on mouse over in topics list * fix isHidden condition
This commit is contained in:
parent
4c76d07f04
commit
62f4778803
2 changed files with 7 additions and 4 deletions
|
@ -24,4 +24,5 @@ export const Link = styled(NavLink).attrs({ activeClassName: 'is-active' })<{
|
|||
|
||||
export const ActionsTd = styled(Td)`
|
||||
overflow: visible;
|
||||
width: 50px;
|
||||
`;
|
||||
|
|
|
@ -185,6 +185,8 @@ const List: React.FC<TopicsListProps> = ({
|
|||
setRecreateTopicConfirmationVisible,
|
||||
] = React.useState(false);
|
||||
|
||||
const isHidden = internal || isReadOnly || !hovered;
|
||||
|
||||
const deleteTopicHandler = React.useCallback(() => {
|
||||
deleteTopic(clusterName, name);
|
||||
}, [name]);
|
||||
|
@ -200,8 +202,8 @@ const List: React.FC<TopicsListProps> = ({
|
|||
|
||||
return (
|
||||
<>
|
||||
{!internal && !isReadOnly && hovered ? (
|
||||
<div className="has-text-right">
|
||||
{!isHidden && (
|
||||
<Dropdown label={<VerticalElipsisIcon />} right>
|
||||
{cleanUpPolicy === CleanUpPolicy.DELETE && (
|
||||
<DropdownItem onClick={clearTopicMessagesHandler} danger>
|
||||
|
@ -223,8 +225,8 @@ const List: React.FC<TopicsListProps> = ({
|
|||
Recreate Topic
|
||||
</DropdownItem>
|
||||
</Dropdown>
|
||||
)}
|
||||
</div>
|
||||
) : null}
|
||||
<ConfirmationModal
|
||||
isOpen={isDeleteTopicConfirmationVisible}
|
||||
onCancel={() => setDeleteTopicConfirmationVisible(false)}
|
||||
|
|
Loading…
Add table
Reference in a new issue