FieldDropdown class
Class for an editable dropdown field.
Signature:
export declare class FieldDropdown extends Field<string>
Extends: Field<string>
Constructors
Constructor | Modifiers | Description |
|---|---|---|
Constructs a new instance of the | ||
Constructs a new instance of the |
Properties
Property | Modifiers | Type | Description |
|---|---|---|---|
| string | ||
SVGElement | null | |||
| number | The y offset from the top of the field to the top of the image, if an image is selected. | |
| number | The total vertical padding above and below an image. | |
| Menu | null | The dropdown menu. | |
| (Optional) | ||
| (not declared) | Magic constant used to represent a separator in a list of dropdown items. | |
boolean | Serializable fields are saved by the serializer, non-serializable fields are not. Editable fields should also be serializable. |
Methods
Method | Modifiers | Description |
|---|---|---|
Updates the dropdown arrow to match the colour/style of the block. | ||
| Create an SVG based arrow. | |
| Create a tspan based arrow. | |
| Ensure that the input value is a valid language-neutral option. | |
| ||
| Update the value of this dropdown field. | |
| Disposes of events and DOM-references belonging to the dropdown editor. | |
Return a list of the options for this dropdown. | ||
| Use the If you use HTMLElement options in Node.js and call this function, ensure that you are supplying an implementation of HTMLElement, such as through jsdom-global. | |
Create the block UI for this dropdown. | ||
| Handle the selection of an item in the dropdown menu. | |
| Draws the border with the correct width. | |
Update the options on this dropdown. This will reset the selected item to the first item in the list. | ||
| Whether or not the dropdown should add a border rect. | |
| Create a dropdown menu under the text. | |
| Factor out common words in statically defined options. Create prefix and/or suffix labels. | |
| Validates the data structure to be processed as an options list. |