PolymerElements / iron-selector

Manages a list of elements that can be selected
32 stars 55 forks source link

In 2.0, fallback-selection doesn't work with empty string. #159

Closed tanin47 closed 7 years ago

tanin47 commented 7 years ago

Description

In 2.0, there's no way to default the selection to the first item if the first item's value is an empty stirng.

In my specific case, the first item of the list has the value as an empty string. I try setting fallback-selection to an empty string. It doesn't work as well.

I try setting fallback-selection to a non-empty string. It works fine.

In 1.0, it seems the default selection is the first item. --- this solves my problem.

Expected outcome

Default to the first item or allow default the selection to an empty string.

Actual outcome

The paper-dropdown-menu isn't selected.

Browsers Affected

tanin47 commented 7 years ago

I can't prove it in jsfiddle. Will reopen if I can.