Placeholder as a data option is not supported anymore?

HTML:

<select class="order-form__select js-basic-single" data-placeholder="Amount specified in">
    <option></option>
    <option value="btc">BTC</option>
    <option value="ltc">LTC</option>
    <option value="eth">ETH</option>
    <option value="eur">EUR</option>
    <option value="CZK">CZK</option>
</select>

JS:

$('select').select2({
    containerCssClass: 'select2-custom-container',
    dropdownCssClass: 'select2-custom-dropdown'
});

Placeholder does not appear. Also as I can see Placeholder adapter does not get any data attributes. Version of select2 is Select2 4.0.6-rc.0. Does it not supported anymore or I just do something wrong?

Seems like it might have been broken (see https://github.com/select2/select2/issues/5133). Could be related to the changes made in https://github.com/select2/select2/pull/4346. We might need to revert this if it is causing so many problems.

I believe I’ve hit a similar bug in this fiddle, that the option value="" is not displayed:

http://jsfiddle.net/ddchrvj7/1/

I’m using version 4.0.4 locally. The fiddle seems to be using 3.2, but both give the same result.

Any workaround would be appreciated ! thanks

EDIT: just upgraded to 4.0.5 and its the same

EDIT2: my fix was to add allowClear:true to the select2() call - however this already had data-allow-clear so I think there’s a bug in the latest build where data-allow-clear is ignored?

Is this still an issue in 4.0.6-rc.1?

Thanks Alex- it does work as expected in 4.0.6 rc1

the differences are:

in 4.0.5 there is an X appearing and the option value="" does not appear, but thats fine because the X does the job
in 4.0.6 the option value="" does appear, and no X, which was the expected behavior

Thats fine for our purposes. thanks for helping

EDIT: the x now appears in 4.0.6. In our code we had a call ele.select2() which assumed that the options would be preserved, they are not, so calls in to refresh the select2 also have to reiterate the options.