Skip to content

Instantly share code, notes, and snippets.

@gallirohik
Created January 30, 2019 13:10
Show Gist options
  • Save gallirohik/c1be6fc162c4d0a1ddadba00f4139f3d to your computer and use it in GitHub Desktop.
Save gallirohik/c1be6fc162c4d0a1ddadba00f4139f3d to your computer and use it in GitHub Desktop.
Dashboard project
import React from "react";
import { AgGridReact } from "ag-grid-react";
import "ag-grid-community/dist/styles/ag-grid.css";
import "ag-grid-community/dist/styles/ag-theme-balham.css";
function DataGrid(props) {
function getSelectedRows() {
console.log("getSelected");
}
return (
<React.Fragment>
<div
className="ag-theme-balham"
style={{ height: "500px", width: "800px" }}
>
<button onClick={getSelectedRows}>Get Selected Rows</button>
<AgGridReact
rowSelection={props.rowSelection}
columnDefs={props.columnDefs}
rowData={props.rowData}
/>
</div>
</React.Fragment>
);
}
export default DataGrid;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment