File tree Expand file tree Collapse file tree 3 files changed +26
-4
lines changed
Expand file tree Collapse file tree 3 files changed +26
-4
lines changed Original file line number Diff line number Diff line change 3131 /**
3232 * The function called by `<paper-input-container>` when the input value or validity changes.
3333 * @param {{
34- * inputElement: (Node |undefined),
34+ * inputElement: (Element |undefined),
3535 * value: (string|undefined),
36- * invalid: ( boolean|undefined)
37- * }} state All properties are optional -
36+ * invalid: boolean
37+ * }} state -
3838 * inputElement: The input element.
3939 * value: The input value.
4040 * invalid: True if the input value is invalid.
Original file line number Diff line number Diff line change 6565 }
6666 } ,
6767
68+ /**
69+ * This overrides the update function in PaperInputAddonBehavior.
70+ * @param {{
71+ * inputElement: (Element|undefined),
72+ * value: (string|undefined),
73+ * invalid: boolean
74+ * }} state -
75+ * inputElement: The input element.
76+ * value: The input value.
77+ * invalid: True if the input value is invalid.
78+ */
6879 update : function ( state ) {
6980 if ( ! state . inputElement ) {
7081 return ;
7182 }
7283
7384 state . value = state . value || '' ;
7485
75- var counter = state . value . length ;
86+ var counter = state . value . length . toString ( ) ;
7687
7788 if ( state . inputElement . hasAttribute ( 'maxlength' ) ) {
7889 counter += '/' + state . inputElement . getAttribute ( 'maxlength' ) ;
Original file line number Diff line number Diff line change 7676 }
7777 } ,
7878
79+ /**
80+ * This overrides the update function in PaperInputAddonBehavior.
81+ * @param {{
82+ * inputElement: (Element|undefined),
83+ * value: (string|undefined),
84+ * invalid: boolean
85+ * }} state -
86+ * inputElement: The input element.
87+ * value: The input value.
88+ * invalid: True if the input value is invalid.
89+ */
7990 update : function ( state ) {
8091 this . _setInvalid ( state . invalid ) ;
8192 }
You can’t perform that action at this time.
0 commit comments