Skip to content

Denpasar v1.0.7

Compare
Choose a tag to compare
@dedenbangkit dedenbangkit released this 10 Oct 05:57
· 144 commits to main since this release

Custom Params

Custom parameters are key-value pairs that we can implement in the Webform Editor.

<WebformEditor
  customParams={{
    label: 'Set Custom Parameter',
    params: [
      {
        name: 'params_name_a',
        label: 'Single Option Param',
        type: 'option',
        multiple: false,
        options: [
          { label: 'Option 1', value: 'SO1' },
          { label: 'Option 2', value: 'SO2' },
        ],
      },
      {
        name: 'params_name_b',
        label: 'Multiple Option Param',
        type: 'option',
        multiple: true,
        options: [
          { label: 'Multiple Option 1', value: 'MO1' },
          { label: 'Multiple Option 2', value: 'MO2' },
        ],
      },
      {
        name: 'params_name_c',
        label: 'Input Param',
        type: 'input',
      },
    ],
  }}
/>

Custom Parameters Setting

Props Description Type
label Label for the custom params tab String | undefined
params List of custom parameters Array[Custom Parameters]

Custom Parameters

Props Description Type
name Parameter name String
label Parameter label String | undefined
type Field Type `option
multiple Whether multiple or not Boolean
options Parameter Options Array[Option Parameters] | undefined

Option Parameters

Props Description Type
label Label for the params options String | undefined
value Value for the params options String