Fix dropdown compiler error

This commit is contained in:
ArthurSonzogni 2024-04-01 21:14:24 +02:00
parent 22a78b23c2
commit c71cf3e4bf
No known key found for this signature in database
GPG Key ID: 41D98248C074CD6C

View File

@ -91,18 +91,19 @@ Component Dropdown(DropdownOption option) {
}
if (!transform) {
transform = [](bool _open, Element _checkbox, Element _radiobox) {
if (_open) {
transform = [](bool open, Element checkbox_element,
Element radiobox_element) {
if (open) {
const int max_height = 12;
return vbox({
_checkbox,
checkbox_element,
separator(),
_radiobox | vscroll_indicator | frame |
radiobox_element | vscroll_indicator | frame |
size(HEIGHT, LESS_THAN, max_height),
}) |
border;
}
return vbox({_checkbox, filler()}) | border;
return vbox({checkbox_element, filler()}) | border;
};
}
}