godbasin / vue-select2

select2 component in vue.
MIT License
123 stars 62 forks source link

Fixed a bug with the placeholder #29

Closed mattialerda closed 4 years ago

mattialerda commented 4 years ago

With the current setup of the placeholder, the "allowClear" setting of select2 does not work. The reason is that the "allowClear" required a placeholder setted via js. In the way you are setting the placeholder (on the select tag), the select2 js can't find it. If you compare the html (between the current and my version) you can see the difference. With my fix you can see that there's two point where the placeholder is set; one in the select tag (like the current version) and one in a span tag below.

Sorry for my bad english, I hope you understand the issue.

godbasin commented 4 years ago

Your commit is not clear because you format the file. Counld you commit a specific one? image

mattialerda commented 4 years ago

Sorry, I haven't noticed that. I'll fix it.

mattialerda commented 4 years ago

Commit fix done!

godbasin commented 4 years ago

Version 0.4.3 published.

mattialerda commented 4 years ago

Thanks, I'll install it via npm on my project ;)