Add brief docs to Table component explaining the schema prop

This commit is contained in:
Andrew Kingston 2021-05-14 13:11:23 +01:00
parent d8bbb5e06d
commit 753f0befbc
1 changed files with 10 additions and 0 deletions

View File

@ -4,6 +4,16 @@
import CellRenderer from "./CellRenderer.svelte"
import SelectEditRenderer from "./SelectEditRenderer.svelte"
/**
* The expected schema is our normal couch schemas for our tables.
* Each field schema can be enriched with a few extra properties to customise
* the behaviour.
* All of these are optional and do not need to be added.
* displayName: Overrides the field name displayed as the column title
* sortable: Set to false to disable sorting data by a certain column
* editable: Set to false to disable editing a certain column if the
* allowEditColumns prop is true
*/
export let data = []
export let schema = {}
export let showAutoColumns = false