Vue-select: Disabling the ability to deselect

Created on 20 Mar 2018  路  3Comments  路  Source: sagalbot/vue-select

Is there a way to disable the ability to remove the current selection if you're on single selection mode? So basically remove the little cross.

Most helpful comment

You can hide the clear button with CSS:
.v-select .dropdown-toggle .clear { visibility: hidden; }

And you can hide the active item in the dropdown list with CSS:
.v-select .dropdown-menu .active { display: none; }

All 3 comments

This was discussed here and has already been merged in https://github.com/sagalbot/vue-select/pull/470. You can wait for the next release or disable it with CSS if it is something urgent.

You can hide the clear button with CSS:
.v-select .dropdown-toggle .clear { visibility: hidden; }

And you can hide the active item in the dropdown list with CSS:
.v-select .dropdown-menu .active { display: none; }

This is in the recent releases.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

xuwenhao picture xuwenhao  路  3Comments

theseawolves picture theseawolves  路  4Comments

FrozenIce0617 picture FrozenIce0617  路  3Comments

fabianmieller picture fabianmieller  路  3Comments

threeaccents picture threeaccents  路  3Comments