Created
January 30, 2019 13:10
-
-
Save gallirohik/c1be6fc162c4d0a1ddadba00f4139f3d to your computer and use it in GitHub Desktop.
Dashboard project
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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