How to use ag-grid in Observable Framework?
I’m using this code:
<div class="card" style="margin: 0 -1rem;">
<div id="gridContainer" class="ag-theme-alpine"></div>
</div>
```js
const gridOptions = ({
columnDefs: [
{ headerName: "Species", field: "species", filter: true },
{ headerName: "Island", field: "island", filter: true },
{ headerName: "Culmen length (mm)", field: "culmen_length_mm", filter: true },
{ headerName: "Culmen depth (mm)", field: "culmen_depth_mm", filter: true },
{ headerName: "Flipper length (mm)", field: "flipper_length_mm", filter: true },
{ headerName: "Body mass (grams)", field: "body_mass_g", filter: true },
{ headerName: "Sex", field: "sex", filter: true }
],
rowData: penguins,
rowSelection: "single"
})
const instcgrid = new AgGrid.Grid(gridContainer, gridOptions);
gridOptions.api.sizeColumnsToFit();
thank you in advance