vue2-selectize
vue2-selectize copied to clipboard
Use options without value attribute
Standard selects allow us to use options without specifying value attributes. In that case content inside <option>
tag will be used as a value.
If I remember correctly, pure Selectize.js library allows to use options without value attribute.
vue2-selectize in that case causes errors to the console and does not operate correctly.
Is there any particular use-case for this that can't be achieved with the current implementation?
Sure. Intuitively you try to use this component as a replacement for selects. You use <option>
without value, which is totally legal with <select>
and then suddenly wonder why and what does not work as expected. I used three selectizes on my page and I had to examine each component to see why something was not working. And I found out that in one component value attributes were not set explicitly.
Well, if you cannot or do not plan to allow the ability to omit value attributes, some remark would be useful in README: you MUST explicitly set value attributes in each option.