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

Support adding add-ons #262

Closed
zoechi opened this issue Nov 27, 2015 · 5 comments
Closed

Support adding add-ons #262

zoechi opened this issue Nov 27, 2015 · 5 comments

Comments

@zoechi
Copy link

zoechi commented Nov 27, 2015

I don't know if this is possible, but it would be nice if I could pass in custom add-ons to be handled by the paper-input-containers add-on support (like it's now with prefix and suffix).

@MeTaNoV
Copy link
Contributor

MeTaNoV commented Nov 27, 2015

Maybe you should not try to wrap a <paper-input> but instead, write your own input based on Polymer.PaperInputBehavior and <paper-input-container> where you will have maximum flexibility. This is the case for gold elements and I also adopted this strategy for my <gold-password-input>
Moreover, you might have some nasty side-effect if your are then using it in the scope of an <iron-form> (cf. <iron-input> Issue 64)

@zoechi
Copy link
Author

zoechi commented Nov 27, 2015

@MeTaNoV I was thinking about this too.
I am curious if there are specific reasons why this is not supported like "nobody found the time to do it", "there are technical hurdles", "this is not what this element is intended to do", ...

@MeTaNoV
Copy link
Contributor

MeTaNoV commented Nov 27, 2015

@zoechi I think <paper-input> is to be considered as a semi-generic implementation based on more generic elements like mentioned above and as such, should be regarded as an example to build your own custom input.
@notwaldorf could probably answer this question better! :)

@chiefcll
Copy link
Contributor

chiefcll commented Dec 6, 2015

<paper-input> can still be generic and add tons of options / functionality by including <content select="[add-on]"></content>

I was able to completely style paper-input to how I wanted it but now not being able to add an add-on is my major hurdle. I'll submit a patch.

chiefcll added a commit to chiefcll/paper-input that referenced this issue Dec 6, 2015
@notwaldorf
Copy link
Contributor

Yeah @MeTaNoV is right. paper-input is supposed to be a generic, out of the box input. If you need to start adding custom add-ons, you should use paper-input-container. At the moment, I am hesitant to add this to paper-input since it's quite an expensive element already, and there's a bit of effort being made trying to slim it down --this would mean making it less of a "kitchen sink" element (which is reserved for paper-input-container), and more of a "it works for you out of the box, or it doesn't" kind of element.

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