Drop-Down Menu with Custom Item Template
If you want to customize a drop-down menu item, follow the steps below:
Implement a component that renders item markup.
The item is an object that implements the
IActioninterface. This object is passed to the component as a prop.
Register the component so that it can be accessed by name.
In React, register the component in
ReactElementFactoryas shown in the
In Angular, register the component in
AngularComponentFactoryas shown in the
In Vue and Knockout, use techniques native to these libraries:
Assign the component name to the Dropdown question's
itemComponentproperty in the survey JSON schema.