Skip to content

Commit

Permalink
[docs] misc cleanup: remove unnecessary <div>s
Browse files Browse the repository at this point in the history
  • Loading branch information
cee-chen committed Mar 4, 2024
1 parent c41a690 commit dca0ca5
Showing 1 changed file with 14 additions and 16 deletions.
30 changes: 14 additions & 16 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,20 +153,18 @@ export default () => {

return (
<SelectionContext.Provider value={rowSelection}>
<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>
<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' }}
/>
</SelectionContext.Provider>
);
};

0 comments on commit dca0ca5

Please sign in to comment.