Skip to main content

sizes

Description

Optional. An object with the table sizes settings (width and height)

Usage

sizes?: {
rowHeight?: number,
colWidth?: number,
headerHeight?: number,
footerHeight?: number
}

Parameters

  • rowHeight - (optional) the row height in the table in pixels
  • headerHeight - (optional) the header height in pixels
  • footerHeight - (optional) the footer height in pixels
  • colWidth - (optional) the column width in pixels

Default values are the following:

  • rowHeight: 40,
  • colWidth: 160,
  • headerHeight: 32,
  • footerHeight: 32

Example

<script>
import { getData } from "./common/data";
import { Grid } from "wx-svelte-grid";

const { data, columns } = getData();

let sizes = {
rowHeight: 37,
colWidth: 160,
headerHeight: 30,
footerHeight: 30,
};

</script>

<Grid {data} {columns} {sizes} />