1
0
Fork 0
mirror of synced 2024-06-18 02:14:56 +12:00

Add title setting to table with search block and fix import paths

This commit is contained in:
Andrew Kingston 2021-11-02 08:51:48 +00:00
parent 7bd46a6ecb
commit 4cbe82c1db
2 changed files with 17 additions and 2 deletions

View file

@ -2580,6 +2580,11 @@
"icon": "Table",
"styles": ["size"],
"settings": [
{
"type": "text",
"label": "Title",
"key": "title"
},
{
"type": "dataSource",
"label": "Data",

View file

@ -1,7 +1,9 @@
<script>
import Block from "./Block.svelte"
import BlockComponent from "./BlockComponent.svelte"
import Block from "components/Block.svelte"
import BlockComponent from "components/BlockComponent.svelte"
import { Heading } from "@budibase/bbui"
export let title
export let dataSource
export let searchColumns
export let filter
@ -38,6 +40,11 @@
<BlockComponent type="form" bind:id={formId} props={{ dataSource }}>
{#if searchColumns?.length}
<div class="search">
{#if title}
<div class="title">
<Heading>{title}</Heading>
</div>
{/if}
{#each searchColumns as column}
<BlockComponent
type="stringfield"
@ -86,4 +93,7 @@
margin-bottom: 20px;
gap: 10px;
}
.title {
flex: 1 1 auto;
}
</style>