Merge pull request #711 from Budibase/feature/grid-functionality-additions
Feature/grid functionality additions
This commit is contained in:
commit
e7954789ef
|
@ -346,6 +346,18 @@ export default {
|
||||||
],
|
],
|
||||||
placeholder: "alpine",
|
placeholder: "alpine",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: "Height",
|
||||||
|
key: "height",
|
||||||
|
defaultValue: "500",
|
||||||
|
control: Input,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "Pagination",
|
||||||
|
key: "pagination",
|
||||||
|
valueKey: "checked",
|
||||||
|
control: Checkbox,
|
||||||
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
children: [],
|
children: [],
|
||||||
|
|
|
@ -237,7 +237,9 @@
|
||||||
"balham-dark",
|
"balham-dark",
|
||||||
"material"
|
"material"
|
||||||
]
|
]
|
||||||
}
|
},
|
||||||
|
"height": "number",
|
||||||
|
"pagination": "bool"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"dataform": {
|
"dataform": {
|
||||||
|
|
|
@ -18,6 +18,8 @@
|
||||||
export let datasource = {}
|
export let datasource = {}
|
||||||
export let editable
|
export let editable
|
||||||
export let theme = 'alpine'
|
export let theme = 'alpine'
|
||||||
|
export let height;
|
||||||
|
export let pagination
|
||||||
|
|
||||||
let dataLoaded = false
|
let dataLoaded = false
|
||||||
let data
|
let data
|
||||||
|
@ -32,6 +34,8 @@
|
||||||
},
|
},
|
||||||
rowSelection: editable ? "multiple" : false,
|
rowSelection: editable ? "multiple" : false,
|
||||||
suppressRowClickSelection: !editable,
|
suppressRowClickSelection: !editable,
|
||||||
|
paginationAutoPageSize: true,
|
||||||
|
pagination
|
||||||
}
|
}
|
||||||
|
|
||||||
onMount(async () => {
|
onMount(async () => {
|
||||||
|
@ -110,7 +114,7 @@
|
||||||
href="https://cdn.jsdelivr.net/npm/flatpickr/dist/flatpickr.min.css" />
|
href="https://cdn.jsdelivr.net/npm/flatpickr/dist/flatpickr.min.css" />
|
||||||
</svelte:head>
|
</svelte:head>
|
||||||
|
|
||||||
<div class="container">
|
<div class="container" style="--grid-height: {height}px">
|
||||||
{#if dataLoaded}
|
{#if dataLoaded}
|
||||||
{#if editable}
|
{#if editable}
|
||||||
<div class="controls">
|
<div class="controls">
|
||||||
|
|
Loading…
Reference in New Issue