mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-10-29 08:12:56 +00:00
use the same editor as <Select />
This commit is contained in:
@@ -2208,8 +2208,8 @@ This is a paragraph.
|
||||
defaultItems: {
|
||||
type: 'static',
|
||||
fieldType: 'array',
|
||||
subFieldType: 'text',
|
||||
value: []
|
||||
subFieldType: 'selectvalue',
|
||||
value: undefined
|
||||
} as StaticAppInput,
|
||||
placeholder: {
|
||||
type: 'static',
|
||||
|
||||
@@ -33,6 +33,8 @@
|
||||
value.push({})
|
||||
} else if (subFieldType === 'labeledresource' || subFieldType === 'labeledselect') {
|
||||
value.push({ value: 'value', label: 'label' })
|
||||
} else if (subFieldType === 'selectvalue') {
|
||||
value.push('')
|
||||
} else if (subFieldType === 'tab-select') {
|
||||
value.push({ id: '', index: 0 })
|
||||
} else if (
|
||||
|
||||
+8
@@ -161,6 +161,14 @@
|
||||
/>
|
||||
</div>
|
||||
{/if}
|
||||
{:else if fieldType === 'selectvalue'}
|
||||
<div class="flex w-full flex-col">
|
||||
<JsonEditor
|
||||
small
|
||||
bind:value={componentInput.value}
|
||||
code={JSON.stringify(componentInput.value, null, 2)}
|
||||
/>
|
||||
</div>
|
||||
{:else if fieldType === 'array'}
|
||||
<ArrayStaticInputEditor {id} {subFieldType} bind:componentInput on:deleteArrayItem />
|
||||
{:else if fieldType === 'schema'}
|
||||
|
||||
@@ -20,6 +20,7 @@ export type InputType =
|
||||
| 'any'
|
||||
| 'labeledresource'
|
||||
| 'labeledselect'
|
||||
| 'selectvalue'
|
||||
| 'tab-select'
|
||||
| 'schema'
|
||||
| 'ag-grid'
|
||||
@@ -207,6 +208,7 @@ export type AppInput =
|
||||
| (AppInputSpec<'array', string[], 'select'> & StaticOptions)
|
||||
| AppInputSpec<'array', object[], 'labeledresource'>
|
||||
| AppInputSpec<'array', object[], 'labeledselect'>
|
||||
| AppInputSpec<'array', object[], 'selectvalue'>
|
||||
| AppInputSpec<'labeledselect', object>
|
||||
| AppInputSpec<'labeledresource', object>
|
||||
| AppInputSpec<'array', object[], 'tab-select'>
|
||||
|
||||
Reference in New Issue
Block a user