Vaadin-combo-box: how can I remove the 'cancel' button?

Created on 23 Jun 2017  ·  6Comments  ·  Source: vaadin/vaadin-combo-box

I don't want the user to be able to cancel since it doesn't do what the docs say - they say it should revert to the original value, but it simply clears the field, which I don't want.

All 6 comments

You could pass something like an invisible icon into clear-button slot. As of 1.x, this looks like this (for 2.x you should use slot instead of class):

<paper-icon-button class="hidden" slot="clear-button"></paper-icon-button>
.hidden {
  display: none;
}

The solution for v3: https://jsfiddle.net/6r5htd05/33/

I don’t actually understand the original issue. There is no “cancel” button, only a “clear” button. Do we say “cancel button” somewhere in our docs?

Pressing ESC reverts to the currently selected value.

@jouni the possible use case is the required field which, once selected, should never be cleared and could be just changed.

E. g. some kind of entity version selector (if that entity, article etc, has no saved versions yet, it should not be displayed at all).

Sure, I understand that use case. But the original issue description doesn’t mention that, so I was wondering where @davidmaxwaterman found that piece of documentation.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

JMuratha picture JMuratha  ·  4Comments

florent1933 picture florent1933  ·  14Comments

steffen-harbich-cognitum picture steffen-harbich-cognitum  ·  8Comments

osamamaruf picture osamamaruf  ·  4Comments

anasmi picture anasmi  ·  18Comments