Stay organized with collections
Save and categorize content based on your preferences.
blockly > Extensions > buildTooltipForDropdown
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
Parameter |
Type |
Description |
dropdownName |
string |
The 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.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-09-18 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-09-18 UTC."],[[["`buildTooltipForDropdown` creates a function that links dropdown values to tooltips, enhancing user understanding."],["This function requires the dropdown field name (`dropdownName`) and a lookup table (`lookupTable`) mapping values to tooltip text."],["The generated function is an extension applied to blocks, dynamically providing tooltips based on the selected dropdown value."]]],[]]