Dropdown

Use type in defined list

Use type from Fields/Components/Dropdown/script.js

Property

Description

name

Fields name (Unique)

type

dropdown

label

Label of field

description

Description about the field

value

Default value

options

(Object)

options: { values: [ { value: 'h1', title: 'Heading h1' }, { title: 'h2', title: 'Heading h2' }, ], oneline: true },

params: [
    {
        name: 'heading',
        type: 'dropdown',
        label: 'Heading',
        description: 'Heading tag',
        options: {
            oneline: true // title and droplist in one-line  
            values: {
                h1: 'Heading h1',
                h2: 'Heading h2',
                h3: 'Heading h3'
            }
        },
                     
    }
]

Use custom list

params: [
    {
        name: 'heading',
        type: 'dropdown',
        label: 'Heading',
        description: 'Heading tag',
        value: 'h1',
        options: {
            values: [
                {
                    title: 'Group 1',
                    values:{
                        value: 'Label',
                        value2: 'Label 2',
                    }
                },
                {
                    title: 'Group 2',
                    values:{
                        value3: 'Label 3',
                        value4: 'Label 4',
                    }
                },
            ],
            oneline: true
        },
                  
    }
]

Last updated