<@U010Q6P7AQ5> is there anything extra I have to d...
# doodle
a
@Nick is there anything extra I have to do to get dropdowns to work? For some reason they render fine except for the text. This doesn't seem to be the case with other controls.
n
@Alessandro Marcolini are you passing an
ItemVisualizer
to the
Dropdown
? or just giving it a list of data?
Dropdown
uses an
ItemVisualizer
to render the data it holds. the default is to use one that creates a
Label
with the
toString
value for each item. so you’ll need to include a behavior to render those labels if you’re using the default. add
basicLabelBehavior()
from the
Themes
library to your app module list if you are using the default. otherwise you’ll need to make sure any custom Views used to visualize items are rendering.
let me know if this helped.
a
The
basicLabelBehavior()
is what I was looking for. That fixed the problem.
Where can I find the default implementation for the
ItemVisualizer
? edit: I found it
How does the context parameter in
ItemVisualizer
work?
n
it lets different controls pass custom data to the visualizer without having to require different visualizer types. so
List
passes the item’s index and selection state. but you can still use a visualizer with
List
that doesn’t care about these values. this is how StringVisualizer works and what let’s it be used for a variety of controls.