Skip to main content

Home > blockly > utils > extensions > buildTooltipForDropdown

utils.extensions.buildTooltipForDropdown() function

Builds an extension function that will map a dropdown value to a tooltip string.

Signature:

export declare function buildTooltipForDropdown(dropdownName: string, lookupTable: {
[key: string]: string;
}): (this: Block) => void;

Parameters

ParameterTypeDescription
dropdownNamestringThe name of the field whose value is the key to the lookup table.
lookupTable{ [key: string]: string; }The table of field values to tooltip text.

Returns:

(this: Block) => void

The extension function.