Skip to content

Commit

Permalink
Revert accidental main pushes 🤦
Browse files Browse the repository at this point in the history
  • Loading branch information
cee-chen committed Mar 4, 2024
1 parent dca0ca5 commit 635f860
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 21 deletions.
30 changes: 16 additions & 14 deletions src-docs/src/views/datagrid/styling/row_classes.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ const SelectionRowCell = ({ rowIndex }) => {
const [selectedRows, updateSelectedRows] = useContext(SelectionContext);
const isChecked = selectedRows.has(rowIndex);
return (
<>
<div>
<EuiCheckbox
id={`${rowIndex}`}
aria-label={`Select row ${rowIndex}, ${data[rowIndex].name}`}
Expand All @@ -103,7 +103,7 @@ const SelectionRowCell = ({ rowIndex }) => {
}
}}
/>
</>
</div>
);
};

Expand Down Expand Up @@ -153,18 +153,20 @@ export default () => {

return (
<SelectionContext.Provider value={rowSelection}>
<EuiDataGrid
aria-label="Top EUI contributors"
columns={columns}
columnVisibility={{ visibleColumns, setVisibleColumns }}
rowCount={data.length}
renderCellValue={({ rowIndex, columnId }) => data[rowIndex][columnId]}
leadingControlColumns={leadingControlColumns}
toolbarVisibility={{
additionalControls: <SelectionButton />,
}}
gridStyle={{ rowClasses, rowHover: 'none' }}
/>
<div>
<EuiDataGrid
aria-label="Top EUI contributors"
columns={columns}
columnVisibility={{ visibleColumns, setVisibleColumns }}
rowCount={data.length}
renderCellValue={({ rowIndex, columnId }) => data[rowIndex][columnId]}
leadingControlColumns={leadingControlColumns}
toolbarVisibility={{
additionalControls: <SelectionButton />,
}}
gridStyle={{ rowClasses, rowHover: 'none' }}
/>
</div>
</SelectionContext.Provider>
);
};
4 changes: 0 additions & 4 deletions src/components/datagrid/_data_grid_data_row.scss
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,6 @@
height: auto;
display: flex;
align-items: center;

&.euiDataGridRowCell__content--defaultHeight {
height: 100%;
}
}

// Positioning for cell actions & the cell expansion popover
Expand Down
4 changes: 1 addition & 3 deletions src/components/datagrid/body/data_grid_row_manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,7 @@ export const useRowManager = ({
if (rowClasses) {
rowIdToElements.current.forEach((rowElement, rowIndex) => {
const euiClasses = Array.from(rowElement.classList)
.filter((className) =>
['euiDataGridRow', 'euiDataGridRow--striped'].includes(className)
)
.filter((className) => className.startsWith('euiDataGridRow'))
.join(' ');

if (rowClasses[rowIndex]) {
Expand Down

0 comments on commit 635f860

Please sign in to comment.