1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

update components

This commit is contained in:
Luke Pulverenti 2016-03-10 15:07:23 -05:00
parent 411b85f351
commit 709f0726da
8 changed files with 108 additions and 58 deletions

View file

@ -25,6 +25,9 @@ For example:
<input is="iron-input">
</paper-input-container>
Do not wrap <paper-input-contanter> around elements that already include it, such as <paper-input>.
Doing so may cause events to bounce infintely between the container and its contained element.
### Listening for input changes
By default, it listens for changes on the `bind-value` attribute on its children nodes and perform
@ -43,6 +46,11 @@ compound input field like a social security number input. The custom input eleme
<ssn-input class="paper-input-input"></ssn-input>
</paper-input-container>
If you're using a `<paper-input-container>` imperatively, it's important to make sure
that you attach its children (the `iron-input` and the optional `label`) before you
attach the `<paper-input-container>` itself, so that it can be set up correctly.
### Validation
If the `auto-validate` attribute is set, the input container will validate the input and update
@ -457,14 +465,15 @@ This element is `display:block` by default, but you can set the `inline` attribu
}
this.addEventListener('focus', this._boundOnFocus, true);
this.addEventListener('blur', this._boundOnBlur, true);
},
attached: function() {
if (this.attrForValue) {
this._inputElement.addEventListener(this._valueChangedEvent, this._boundValueChanged);
} else {
this.addEventListener('input', this._onInput);
}
},
attached: function() {
// Only validate when attached if the input already has a value.
if (this._inputElementValue != '') {
this._handleValueAndAutoValidate(this._inputElement);