Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how can I remove the 'cancel' button? #469

Closed
davidmaxwaterman opened this issue Jun 23, 2017 · 6 comments
Closed

how can I remove the 'cancel' button? #469

davidmaxwaterman opened this issue Jun 23, 2017 · 6 comments

Comments

@davidmaxwaterman
Copy link

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.

@web-padawan
Copy link
Member

web-padawan commented Jun 23, 2017

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;
}

@limonte
Copy link
Contributor

limonte commented Sep 12, 2017

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

@limonte limonte closed this as completed Sep 12, 2017
@jouni
Copy link
Member

jouni commented Sep 12, 2017

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?

@jouni
Copy link
Member

jouni commented Sep 12, 2017

Pressing ESC reverts to the currently selected value.

@web-padawan
Copy link
Member

@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).

@jouni
Copy link
Member

jouni commented Sep 12, 2017

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants