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

Behavior of maxlength property/HTML property passthrough #167

Closed
jamesdixon opened this issue Sep 2, 2015 · 2 comments
Closed

Behavior of maxlength property/HTML property passthrough #167

jamesdixon opened this issue Sep 2, 2015 · 2 comments

Comments

@jamesdixon
Copy link

I normally would have separated this into two issues, but they were very closely related, so my apologies ahead of time.

I added the maxlength property to paper-input anticipating that it would limit the number of characters I was able to enter in the field. Instead, this initializes the character counter, which counts the characters as the user types and shows the max amount of characters allowed, but it does not limit the number of characters able to be entered into the field.

I realize that the Angular Material spec does exactly this and it uses the maxlength property, but maybe it would be better to rename that functionality something else, such as charCount. That said, it seems that we should be able to pass through HTML properties even if they aren't enacted on in the component.

I can think of a number of a couple of use cases off the top of my head:

  • Allow the default HTML maxlength property to limit the number of characters entered into the field
  • Allow for data-* properties to be passed through. For example, this would be helpful when using a plugin such as jquery.inputmask to add input masks to fields in a more declarative fashion.

Any thoughts on this? Disadvantages to allowing a pass-through?

@cah-danmonroe
Copy link
Contributor

I've submitted a pull request (170) for pass-through attributes. I'm not sure how we can pass through data-* properties though. I heard "they" are working on a "splat" type that may work for us. Wait and see I guess.

@peec
Copy link
Contributor

peec commented Sep 20, 2015

Closed as of #170 is now in master.
Regarding data- attributes, lets wait for Splat operator so we can easily pass-through data attributes.

@peec peec closed this as completed Sep 20, 2015
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

3 participants