Official Support Area, Q&As, Discussions, Suggestions and Bug reports.
Forum's Guidelines
This has been known as an unintended bug of Select2 client js. Would you pls try the following workaround and let us know the result:
<style>
.select2-search--inline {
display: contents; /*this will make the container disappear, making the child the one who sets the width of the element*/
}
.select2-search__field:placeholder-shown {
width: 100% !important; /*makes the placeholder to be 100% of the width while there are no options selected*/
}
</style>
Sorry that workaround didn't solve the case. After some more research I think that Select2 follows the default behaviour of the normal Select html element where in single mode the default initial value is the first option.
A solution you can apply right now is adding an empty string value option to the beginning of the Selects' options, i.e adding an empty string element to the data array. Meanwhile we will add a feature to the next version of KoolReport so that Select2 can default to an empty value in single mode if users want it.
Let KoolReport help you to make great reports. It's free & open-source released under MIT license.
Download KoolReport View demo