Browse Source

Merge pull request #711 from Budibase/feature/grid-functionality-additions

Feature/grid functionality additions
pull/718/head
Kevin Åberg Kultalahti 6 years ago
committed by GitHub
parent
commit
06fef5334e
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 12
      packages/builder/src/components/userInterface/temporaryPanelStructure.js
  2. 4
      packages/standard-components/components.json
  3. 6
      packages/standard-components/src/DataGrid/Component.svelte

12
packages/builder/src/components/userInterface/temporaryPanelStructure.js

@ -346,6 +346,18 @@ export default {
],
placeholder: "alpine",
},
{
label: "Height",
key: "height",
defaultValue: "500",
control: Input,
},
{
label: "Pagination",
key: "pagination",
valueKey: "checked",
control: Checkbox,
},
],
},
children: [],

4
packages/standard-components/components.json

@ -237,7 +237,9 @@
"balham-dark",
"material"
]
}
},
"height": "number",
"pagination": "bool"
}
},
"dataform": {

6
packages/standard-components/src/DataGrid/Component.svelte

@ -18,6 +18,8 @@
export let datasource = {}
export let editable
export let theme = 'alpine'
export let height;
export let pagination
let dataLoaded = false
let data
@ -32,6 +34,8 @@
},
rowSelection: editable ? "multiple" : false,
suppressRowClickSelection: !editable,
paginationAutoPageSize: true,
pagination
}
onMount(async () => {
@ -110,7 +114,7 @@
href="https://cdn.jsdelivr.net/npm/flatpickr/dist/flatpickr.min.css" />
</svelte:head>
<div class="container">
<div class="container" style="--grid-height: {height}px">
{#if dataLoaded}
{#if editable}
<div class="controls">

Loading…
Cancel
Save