Element: [Feature Request] Make clearable work for multi select

Created on 10 Aug 2017  ·  4Comments  ·  Source: ElemeFE/element

Existing Component

Yes

Component Name

Select

Description

There should be a convenient way to clear all of the selections on a single multiple select box at one time without having to build an additional component box. The single select already has this functionality. Forms that combine several of the single and multiple select become inconsistent if one has the clearable feature and the other does not.

<el-select v-model="model" multiple clearable placeholder="Select"/>

select

Most helpful comment

It's specifically coded to be disabled, but I don't see a reason why it should be. I filed it as a feature request instead of a bug as a result. Multiple can be cleared by clicking each of the options but a quick clear for 5+ options is more ideal.

let criteria = this.clearable &&
   !this.disabled &&
   this.inputHovering &&
   !this.multiple &&
   this.value !== undefined &&
   this.value !== '';
return criteria ? 'circle-close is-show-close' : (this.remote && this.filterable ? '' : 'caret-top');

All 4 comments

@Leopoldthecoder I'm not sure if it's a problem or just special when that is multiple~

It's specifically coded to be disabled, but I don't see a reason why it should be. I filed it as a feature request instead of a bug as a result. Multiple can be cleared by clicking each of the options but a quick clear for 5+ options is more ideal.

let criteria = this.clearable &&
   !this.disabled &&
   this.inputHovering &&
   !this.multiple &&
   this.value !== undefined &&
   this.value !== '';
return criteria ? 'circle-close is-show-close' : (this.remote && this.filterable ? '' : 'caret-top');

I am also looking for this feature to be added if at all possible.

+1
This is a very useful feature - with large numbers of select options, users often complain about having to deselect every option manually.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

no5no6 picture no5no6  ·  3Comments

EdenSpark picture EdenSpark  ·  3Comments

chao-hua picture chao-hua  ·  3Comments

dbskccc picture dbskccc  ·  3Comments

yuchonghua picture yuchonghua  ·  3Comments