Add empty text property to all blocks (#10332)
* Add noRowsMessage for Table * CardsBlock noRowsMessage setting * RowExplorer noRowsMessage setting * Add noRowsMessage setting for FormBlock * Fix default noRowsMessage
This commit is contained in:
parent
22d42afe8f
commit
3073fcfc63
|
@ -3661,6 +3661,12 @@
|
|||
"defaultValue": false,
|
||||
"info": "Row selection is only compatible with internal or SQL tables"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"label": "Empty text",
|
||||
"key": "noRowsMessage",
|
||||
"defaultValue": "No rows found"
|
||||
},
|
||||
{
|
||||
"section": true,
|
||||
"name": "On Row Click",
|
||||
|
@ -4375,6 +4381,12 @@
|
|||
"key": "filter",
|
||||
"nested": true
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"label": "Empty text",
|
||||
"key": "noRowsMessage",
|
||||
"defaultValue": "No rows found"
|
||||
},
|
||||
{
|
||||
"type": "searchfield",
|
||||
"label": "Search fields",
|
||||
|
@ -4532,6 +4544,12 @@
|
|||
"label": "Paginate",
|
||||
"key": "paginate"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"label": "Empty text",
|
||||
"key": "noRowsMessage",
|
||||
"defaultValue": "No rows found"
|
||||
},
|
||||
{
|
||||
"section": true,
|
||||
"name": "Cards",
|
||||
|
@ -4945,6 +4963,17 @@
|
|||
],
|
||||
"defaultValue": "spectrum--medium"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"label": "Empty text",
|
||||
"key": "noRowsMessage",
|
||||
"defaultValue": "We couldn't find a row to display",
|
||||
"dependsOn": {
|
||||
"setting": "actionType",
|
||||
"value": "Create",
|
||||
"invert": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"section": true,
|
||||
"name": "Fields",
|
||||
|
@ -5064,6 +5093,12 @@
|
|||
"key": "height",
|
||||
"defaultValue": "426px"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"label": "Empty text",
|
||||
"key": "noRowsMessage",
|
||||
"defaultValue": "No data"
|
||||
},
|
||||
{
|
||||
"section": true,
|
||||
"name": "Cards",
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
export let cardButtonText
|
||||
export let cardButtonOnClick
|
||||
export let linkColumn
|
||||
export let noRowsMessage
|
||||
|
||||
const { fetchDatasourceSchema } = getContext("sdk")
|
||||
|
||||
|
@ -180,7 +181,7 @@
|
|||
hAlign: "stretch",
|
||||
vAlign: "top",
|
||||
gap: "M",
|
||||
noRowsMessage: "No rows found",
|
||||
noRowsMessage: noRowsMessage || "No rows found",
|
||||
}}
|
||||
styles={{
|
||||
custom: `display: grid;\ngrid-template-columns: repeat(auto-fill, minmax(min(${cardWidth}px, 100%), 1fr));`,
|
||||
|
|
|
@ -16,6 +16,8 @@
|
|||
export let detailFields
|
||||
export let detailTitle
|
||||
|
||||
export let noRowsMessage
|
||||
|
||||
const stateKey = generate()
|
||||
|
||||
let listDataProviderId
|
||||
|
@ -105,7 +107,7 @@
|
|||
dataProvider: `{{ literal ${safe(listDataProviderId)} }}`,
|
||||
direction: "column",
|
||||
gap: "S",
|
||||
noRowsMessage: "No data",
|
||||
noRowsMessage: noRowsMessage || "No data",
|
||||
}}
|
||||
>
|
||||
<BlockComponent
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
export let titleButtonText
|
||||
export let titleButtonClickBehaviour
|
||||
export let onClickTitleButton
|
||||
export let noRowsMessage
|
||||
|
||||
const { fetchDatasourceSchema, API } = getContext("sdk")
|
||||
const stateKey = `ID_${generate()}`
|
||||
|
@ -221,6 +222,7 @@
|
|||
allowSelectRows,
|
||||
size,
|
||||
onClick: rowClickActions,
|
||||
noRowsMessage: noRowsMessage || "No rows found",
|
||||
}}
|
||||
/>
|
||||
</BlockComponent>
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
export let showDeleteButton
|
||||
export let rowId
|
||||
export let actionUrl
|
||||
export let noRowsMessage
|
||||
|
||||
const { fetchDatasourceSchema } = getContext("sdk")
|
||||
|
||||
|
@ -89,7 +90,7 @@
|
|||
bind:id={repeaterId}
|
||||
props={{
|
||||
dataProvider,
|
||||
noRowsMessage: "We couldn't find a row to display",
|
||||
noRowsMessage: noRowsMessage || "We couldn't find a row to display",
|
||||
direction: "column",
|
||||
hAlign: "center",
|
||||
}}
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
export let allowSelectRows
|
||||
export let compact
|
||||
export let onClick
|
||||
export let noRowsMessage
|
||||
|
||||
const component = getContext("component")
|
||||
const { styleable, getAction, ActionTypes, rowSelectionStore } =
|
||||
|
@ -144,6 +145,7 @@
|
|||
autoSortColumns={!columns?.length}
|
||||
on:sort={onSort}
|
||||
on:click={handleClick}
|
||||
placeholderText={noRowsMessage || "No rows found"}
|
||||
>
|
||||
<slot />
|
||||
</Table>
|
||||
|
|
Loading…
Reference in New Issue