Hi Harbs,

I've looked couple of times into the DropDownList from Basic. Maybe it's
time to reorganize things. Add there View, Model, Renderers etc ? I did
that for MDL DropDownList.

Thanks, Piotr

2018-01-25 23:18 GMT+01:00 Gabe Harbs <[email protected]>:

> The dataProvider setter in DropDownList has the following code:
>
>                 for (i = 0; i < n; i++) {
>                     opt = document.createElement('option') as
> HTMLOptionElement;
>                     if (lf)
>                         opt.text = value[i][lf];
>                     else
>                         opt.text = value[i];
>                     dd.add(opt, null);
>                 }
>
> Basically, it makes the assumption that the dataProvider is an
> index-accessible object. This is not the case if the dataProvider is a
> collection. In that case, the code should be something like this:
>
>                         opt.text = value.getItemAt(i)[lf];
>                     else
>                         opt.text = value.getItemAt(i);
>
> I’m not sure of the best way to generalize this.
>
> Thoughts?
> Harbs




-- 

Piotr Zarzycki

Patreon: *https://www.patreon.com/piotrzarzycki
<https://www.patreon.com/piotrzarzycki>*

Reply via email to