Add limit placeholder for Automation queries

This commit is contained in:
Mel O'Hagan 2022-05-11 11:25:53 +01:00
parent ef3d110db6
commit ef2244fd20
2 changed files with 3 additions and 0 deletions

View File

@ -53,6 +53,7 @@
: { schema: {} }
$: schema = getSchemaForTable(tableId, { searchableSchema: true }).schema
$: schemaFields = Object.values(schema || {})
$: queryLimit = tableId?.includes("datasource") ? "∞" : "1000"
const onChange = Utils.sequential(async (e, key) => {
try {
@ -330,6 +331,7 @@
on:change={e => onChange(e, key)}
{bindings}
updateOnChange={false}
placeholder={value.customType === "queryLimit" ? queryLimit : ""}
/>
</div>
{/if}

View File

@ -50,6 +50,7 @@ exports.definition = {
limit: {
type: "number",
title: "Limit",
customType: "queryLimit",
},
},
required: ["tableId"],