# Select field

# Demo

  <select-field :items="[
      { id: 1, name: 'Item A' },
      { id: 2, name: 'Item B' },
      { id: 3, name: 'Parent item',
        children: [
          { id: 4, name: 'Item C' }
        ]
      }
    ]"
    value="1"
    :empty-option="true"
  />

# Props

id

Type
String

Description
The id attribute of the select field
name

Type
String

Description
The name attribute of the select field
empty-option

Type
Boolean

Default
false

Description
Prepend an empty option to the select field?
items

Type
Array

Default
[]

id-property

Type
String

Default
id

value-property

Type
String

Default
name

value

Type
String, Number

Description
Initial value

# Events

selected

Parameters
Name (String), Value (String, Number)

Description
Emitted when an item gets selected