Skip to content
This repository has been archived by the owner on Feb 10, 2020. It is now read-only.

Latest commit

 

History

History
61 lines (44 loc) · 1.12 KB

select.md

File metadata and controls

61 lines (44 loc) · 1.12 KB

select

image

label:

If set, a label will be generated using label property value as the content.

  • Type: String
  • Required: No

help:

Used to add help text below the field.

  • Type: String
  • Required: No

multiple:

If set, multiple values can be selected.

  • Type: Boolean
  • Required: No

options:

An array of objects containing the following properties:

  • label: (string) The label to be shown to the user.

  • value: (Object) The internal value used to choose the selected value. This is also the value passed to onChange when the option is selected.

  • Type: Array

  • Required: No

For more read gutenberg readme.

Example:

selectOption: {
	type: 'string',
	field: {
		type: 'select',
		label: 'Select Numbers',
		options: [
			{
				value: 'one',
				label: 'one',
			},
			{
				value: 'two',
				label: 'two',
			},
		],
	},
}

Return

This will return selected value.

  • Type: string