Skip to content

Commit

Permalink
fix: prevent dataset selection when clicking on item list action buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
csm-thu committed Apr 11, 2024
1 parent 50cef2d commit 92de8b9
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,16 @@ export const DatasetList = () => {
<ErrorIcon data-cy={`refresh-error-icon-${dataset.id}`} color="error" />
) : null;

const ignoreClick = (event) => {
event.preventDefault();
event.stopPropagation();
};

return (
<div style={{ display: 'flex', flexDirection: 'row' }}>
<Box onClick={ignoreClick} style={{ display: 'flex', flexDirection: 'row' }}>
<div style={{ display: 'inline-flex', padding: '8px', verticalAlign: 'middle' }}>{statusIcon}</div>
<DeleteDatasetButton dataset={dataset} location="" />
</div>
</Box>
);
}, []);

Expand Down

0 comments on commit 92de8b9

Please sign in to comment.