I'm attempting to use react-data-table-component. However, I receive this error in the console when trying to use the package. I'm guessing this is an issue with the package itself... but wanted to check with you guys.
Encountered error in loading JS library: https://cdn.jsdelivr.net/npm/react-data-table-component@7.4.4/dist/index.cjs.min.js
My custom component
<style>
body {
margin: 0;
}
</style>
<script src="https://cdn.tryretool.com/js/react.production.min.js" crossorigin></script>
<script src="https://cdn.tryretool.com/js/react-dom.production.min.js" crossorigin></script>
<script src="https://unpkg.com/@material-ui/core@3.9.3/umd/material-ui.production.min.js"></script>
<script src="https://unpkg.com/styled-components/dist/styled-components.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/react-data-table-component@7.4.4/dist/index.cjs.min.js"></script>
<div id="react"></div>
<script type="text/babel">
const { Card, CardContent } = window["material-ui"];
const DataTable = window['react-data-table'] // does not work
const columns = [ ... ]
const data = [ ... ]
const MyCustomComponent = ({ triggerQuery, model, modelUpdate }) => (
<Card>
<CardContent>
<DataTable
columns={columns}
data={data}>
</DataTable>
</CardContent>
</Card>
);
const ConnectedComponent = Retool.connectReactComponent(MyCustomComponent);
ReactDOM.render(<ConnectedComponent />, document.getElementById("react"));
</script>