Skip to content

Commit 4871a96

Browse files
fix(batchToolTips): make tooltips on batch visible (#13328)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
1 parent 997d7e2 commit 4871a96

File tree

2 files changed

+15
-4
lines changed

2 files changed

+15
-4
lines changed

packages/react/src/components/DataTable/stories/DataTable-batch-actions.stories.js

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
import React from 'react';
99
import { action } from '@storybook/addon-actions';
10-
import { TrashCan, Save, Download } from '@carbon/icons-react';
10+
import { TrashCan, Save, Download, Add } from '@carbon/icons-react';
1111

1212
import Button from '../../Button';
1313
import DataTable, {
@@ -89,6 +89,18 @@ export const Default = () => (
8989
Delete
9090
</TableBatchAction>
9191
<TableBatchAction
92+
hasIconOnly
93+
iconDescription="Add"
94+
tooltipPosition="bottom"
95+
tabIndex={batchActionProps.shouldShowBatchActions ? 0 : -1}
96+
renderIcon={Add}
97+
onClick={batchActionClick(selectedRows)}>
98+
Delete
99+
</TableBatchAction>
100+
<TableBatchAction
101+
hasIconOnly
102+
iconDescription="Save"
103+
tooltipPosition="bottom"
92104
tabIndex={batchActionProps.shouldShowBatchActions ? 0 : -1}
93105
renderIcon={Save}
94106
onClick={batchActionClick(selectedRows)}>

packages/styles/scss/components/data-table/action/_data-table-action.scss

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -393,10 +393,9 @@
393393
.#{$prefix}--batch-actions:focus {
394394
@include focus-outline;
395395
}
396-
396+
// 200% to allow tooltips
397397
.#{$prefix}--batch-actions--active {
398-
overflow: auto hidden;
399-
clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
398+
clip-path: polygon(0 0, 200% 0, 200% 200%, 0 200%);
400399
pointer-events: all;
401400
transform: translate3d(0, 0, 0);
402401
}

0 commit comments

Comments
 (0)