I'm attempting to get only certain values from a drop-down by hiding a select few. Apparently I cannot go over an array index of 3 or nothing shows up and obviously not below an index of 0. I'm trying to hide the first three choices in the drop-down. Any ideas would be appreciated. Please let me know if you need more information.
The printout:
- Select a choice --disabled
- Choice 1
- Choice 2
- Choice 3
- Choice 4
- Choice 5
Code:
List<Map> _predefinedFilterList;
_predefinedFilterList = jsonObject["jsonResponse"] as List<Map>;
for (Map filterMap in _predefinedFilterList) {
dropDownEl.children.add(new OptionElement(data: filterMap["displayName"]));
print("Test: "+filterMap["displayName"]);
// dropDownEl.children[0].hidden = true;
// dropDownEl.children[1].hidden = true;
// dropDownEl.children[2].hidden = true;
}