Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(Datagrid): resolve CSP in subcomponents #6229

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,10 @@ const DatagridExpandedRow =
<td className={`${blockClass}__expanded-row-cell-wrapper`}>
<div
className={`${blockClass}__expanded-row-content`}
style={{
height: expandedContentHeight && expandedContentHeight,
ref={(el) => {
if (el && el.style && expandedContentHeight) {
el.style.height = `${expandedContentHeight}px`;
}
}}
>
<ExpandedRowContentComponent key={key} {..._state} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,6 @@ export const DatagridActions = (datagridState) => {

const searchForAColumn = 'Search';
const isNothingSelected = selectedFlatRows.length === 0;
const style = {
'button:nthChild(1) > span:nthChild(1)': {
bottom: '-37px',
},
};

const renderFilterFlyout = () =>
filterProps?.variation === 'flyout' && (
Expand Down Expand Up @@ -101,7 +96,7 @@ export const DatagridActions = (datagridState) => {
{!mobileToolbar ? (
<>
{renderFilterPanelButton()}
<div style={style}>
<div>
anamikaanu96 marked this conversation as resolved.
Show resolved Hide resolved
<Button
kind="ghost"
hasIconOnly
Expand All @@ -113,12 +108,12 @@ export const DatagridActions = (datagridState) => {
</div>
{renderFilterFlyout()}
{CustomizeColumnsButton && (
<div style={style}>
<div>
<CustomizeColumnsButton />
</div>
)}
<RowSizeDropdown {...rowSizeDropdownProps} />
<div style={style} className={`${blockClass}__toolbar-divider`}>
<div className={`${blockClass}__toolbar-divider`}>
<Button kind="ghost" renderIcon={Add} iconDescription={'Action'}>
Ghost button
</Button>
Expand Down Expand Up @@ -150,7 +145,7 @@ export const DatagridActions = (datagridState) => {
onChange={(e) => setGlobalFilter(e.target.value)}
/>
{renderFilterFlyout()}
<div style={style}>
<div>
<Button
kind="ghost"
hasIconOnly
Expand All @@ -160,7 +155,7 @@ export const DatagridActions = (datagridState) => {
onClick={refreshColumns}
/>
</div>
<div style={style}>
<div>
<Button
kind="ghost"
hasIconOnly
Expand All @@ -171,7 +166,7 @@ export const DatagridActions = (datagridState) => {
/>
</div>
{CustomizeColumnsButton && (
<div style={style}>
<div>
<CustomizeColumnsButton />
</div>
)}
Expand Down
Loading