subview
Description
Optional. Enables adding a Svelte component to a subrowThe functionality allows adding a subtable to a subrow.
To make the subview functionality available, disable the treetoggle
option of the columns
property.
Usage
subview?: {};
Parameters
The name of a Svelte component that should be applied as subrow data.
Example
Example:
<script>
import { getData } from "./common/data";
import { Grid } from "@wx/svelte-grid";
const { data, columns } = getData();
columns[0].subtoggle = true; // enable the subtoggle option
columns[0].width = 60;
import SubGrid from "./stubs/SubGrid.svelte"; //import the component
</script>
<Grid {data} {columns} subview={SubGrid} />
Related articles: