WireComponent
The first example in the sample project uses a React component called Table1
to render a Bootstrap Table using the WireBootstrap React Component.
The example below shows the code for the Table1
component function. It imports the WireBootstrap React Component along with sample data to be bound to the table.
The WireBootstrap React Component is then configured to render the Bootstrap Table using the component
property and display the data configured in the config
property.
import WireComponent from "./wire-component";
import { TableData } from "../sample-data";
export default function Table1() {
const cfg = { data: new TableData() };
return <WireComponent component="wire.bsTable" config={cfg}>
<table className="table table-hover table-striped"></table>
</WireComponent>;
}
Last updated