Browse Source

Add brief docs to Table component explaining the schema prop

gh-pages
Andrew Kingston 5 years ago
parent
commit
753f0befbc
  1. 10
      packages/bbui/src/Table/Table.svelte

10
packages/bbui/src/Table/Table.svelte

@ -4,6 +4,16 @@
import CellRenderer from "./CellRenderer.svelte" import CellRenderer from "./CellRenderer.svelte"
import SelectEditRenderer from "./SelectEditRenderer.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 data = []
export let schema = {} export let schema = {}
export let showAutoColumns = false export let showAutoColumns = false

Loading…
Cancel
Save