Add title setting to table with search block and fix import paths
This commit is contained in:
parent
7bd46a6ecb
commit
4cbe82c1db
|
@ -2580,6 +2580,11 @@
|
||||||
"icon": "Table",
|
"icon": "Table",
|
||||||
"styles": ["size"],
|
"styles": ["size"],
|
||||||
"settings": [
|
"settings": [
|
||||||
|
{
|
||||||
|
"type": "text",
|
||||||
|
"label": "Title",
|
||||||
|
"key": "title"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "dataSource",
|
"type": "dataSource",
|
||||||
"label": "Data",
|
"label": "Data",
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
<script>
|
<script>
|
||||||
import Block from "./Block.svelte"
|
import Block from "components/Block.svelte"
|
||||||
import BlockComponent from "./BlockComponent.svelte"
|
import BlockComponent from "components/BlockComponent.svelte"
|
||||||
|
import { Heading } from "@budibase/bbui"
|
||||||
|
|
||||||
|
export let title
|
||||||
export let dataSource
|
export let dataSource
|
||||||
export let searchColumns
|
export let searchColumns
|
||||||
export let filter
|
export let filter
|
||||||
|
@ -38,6 +40,11 @@
|
||||||
<BlockComponent type="form" bind:id={formId} props={{ dataSource }}>
|
<BlockComponent type="form" bind:id={formId} props={{ dataSource }}>
|
||||||
{#if searchColumns?.length}
|
{#if searchColumns?.length}
|
||||||
<div class="search">
|
<div class="search">
|
||||||
|
{#if title}
|
||||||
|
<div class="title">
|
||||||
|
<Heading>{title}</Heading>
|
||||||
|
</div>
|
||||||
|
{/if}
|
||||||
{#each searchColumns as column}
|
{#each searchColumns as column}
|
||||||
<BlockComponent
|
<BlockComponent
|
||||||
type="stringfield"
|
type="stringfield"
|
||||||
|
@ -86,4 +93,7 @@
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
gap: 10px;
|
gap: 10px;
|
||||||
}
|
}
|
||||||
|
.title {
|
||||||
|
flex: 1 1 auto;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
Loading…
Reference in New Issue