231
231
< template is ="dom-if " if ="{{item.imgUrl}} ">
232
232
< div class ="icon avatar-chip-icon "> < img src$ ="[[item.imgUrl]] "> </ div >
233
233
</ template >
234
- < template is ="dom-if " if ="{{!item.imgUrl}} ">
234
+ < template is ="dom-if " if ="{{!item.imgUrl}} ">
235
235
< div class ="icon avatar-chip-icon "> [[getInitialsFrom(item.text)]]</ div >
236
236
</ template >
237
- </ paper-chip >
238
- </ template >
239
- < div id ="inputContainer " class ="input-container ">
240
- < input is ="iron-input " id ="input " class ="autocomplete-input "
241
- on-keyup ="_local_keyup "
242
- on-keydown ="_local_keydown "
243
- on-paste ="_local_paste "
244
- on-blur ="_local_blur "
245
- on-focus ="_onInputFocus "
246
- aria-labelledby$ ="[[_ariaLabelledBy]] "
247
- aria-describedby$ ="[[_ariaDescribedBy]] "
248
- disabled$ ="[[disabled]] "
249
- bind-value ="{{inputValue}} "
250
- invalid ="{{invalid}} "
251
- prevent-invalid-input ="[[preventInvalidInput]] "
252
- allowed-pattern ="[[allowedPattern]] "
253
- validator ="[[validator]] "
254
- type$ ="[[type]] "
255
- pattern$ ="[[pattern]] "
256
- required$ ="[[required]] "
257
- autocomplete$ ="[[autocomplete]] "
258
- autofocus$ ="[[autofocus]] "
259
- inputmode$ ="[[inputmode]] "
260
- minlength$ ="[[minlength]] "
261
- maxlength$ ="[[maxlength]] "
262
- min$ ="[[min]] "
263
- max$ ="[[max]] "
264
- step$ ="[[step]] "
265
- name$ ="[[name]] "
266
- placeholder$ ="[[_placeholderAfterSelected]] "
267
- readonly$ ="[[readonly]] "
268
- list$ ="[[list]] "
269
- size$ ="[[size]] "
270
- autocapitalize$ ="[[autocapitalize]] "
271
- autocorrect$ ="[[autocorrect]] "
272
- on-change ="_onChange "
273
- tabindex$ ="[[tabindex]] "
274
- autosave$ ="[[autosave]] "
275
- results$ ="[[results]] "
276
- accept$ ="[[accept]] "
277
- multiple$ ="[[multiple]] ">
278
- </ div >
279
- </ div >
280
-
281
- < div class ="suffix-container " suffix >
282
- < content select ="[suffix] "> </ content >
283
- </ div >
284
-
285
- < template is ="dom-if " if ="[[errorMessage]] ">
237
+ </ paper-chip >
238
+ </ template >
239
+ < div id ="inputContainer " class ="input-container ">
240
+ < input is ="iron-input " id ="input " class ="autocomplete-input " on-keyup ="_local_keyup " on-keydown ="_local_keydown " on-paste ="_local_paste "
241
+ on-blur ="_local_blur " on-focus ="_onInputFocus " aria-labelledby$ ="[[_ariaLabelledBy]] " aria-describedby$ ="[[_ariaDescribedBy]] "
242
+ disabled$ ="[[disabled]] " bind-value ="{{inputValue}} " invalid ="{{invalid}} " prevent-invalid-input ="[[preventInvalidInput]] "
243
+ allowed-pattern ="[[allowedPattern]] " validator ="[[validator]] " type$ ="[[type]] " pattern$ ="[[pattern]] " required$ ="[[required]] "
244
+ autocomplete$ ="[[autocomplete]] " autofocus$ ="[[autofocus]] " inputmode$ ="[[inputmode]] " minlength$ ="[[minlength]] " maxlength$ ="[[maxlength]] "
245
+ min$ ="[[min]] " max$ ="[[max]] " step$ ="[[step]] " name$ ="[[name]] " placeholder$ ="[[_placeholderAfterSelected]] " readonly$ ="[[readonly]] "
246
+ list$ ="[[list]] " size$ ="[[size]] " autocapitalize$ ="[[autocapitalize]] " autocorrect$ ="[[autocorrect]] " on-change ="_onChange "
247
+ tabindex$ ="[[tabindex]] " autosave$ ="[[autosave]] " results$ ="[[results]] " accept$ ="[[accept]] " multiple$ ="[[multiple]] ">
248
+ </ div >
249
+ </ div >
250
+
251
+ < div class ="suffix-container " suffix >
252
+ < content select ="[suffix] "> </ content >
253
+ </ div >
254
+
255
+ < template is ="dom-if " if ="[[errorMessage]] ">
286
256
< paper-input-error > [[errorMessage]]</ paper-input-error >
287
257
</ template >
288
- </ paper-input-container >
289
- < paper-material id ="suggestionsPanel " elevation ="3 " class ="autocomplete-suggestion-container " animated ="[[animated]] ">
290
- < template is ="dom-if " if ="{{_loading}} ">
258
+ </ paper-input-container >
259
+ < paper-material id ="suggestionsPanel " elevation ="3 " class ="autocomplete-suggestion-container " animated ="[[animated]] ">
260
+ < template is ="dom-if " if ="{{_loading}} ">
291
261
< div id ="loading ">
292
262
< content select ="[loading] "> </ content >
293
263
</ div >
294
264
</ template >
295
265
296
- < paper-autocomplete-results id ="autocompleteResults " class ="autocomplete-suggestions " hidden ="[[_loading]] ">
297
- < template is ="dom-if " if ="[[!groupedSuggestions]] ">
266
+ < paper-autocomplete-results id ="autocompleteResults " class ="autocomplete-suggestions " hidden ="[[_loading]] ">
267
+ < template is ="dom-if " if ="[[!groupedSuggestions]] ">
298
268
< template is ="dom-repeat " items ="{{_suggestions}} ">
299
269
< paper-icon-item class ="suggestion-item " data-key ="[[item.key]] " data-text ="[[item.text]] " data-tag$ ="[[item.tag]] " data-object ="[[item]] " on-mouseover ="_onMouseOverSelectable " on-tap ="_onTapSelectable " tabindex ="-1 " selectable-item >
300
270
< template is ="dom-if " if ="{{item.imgUrl}} ">
301
271
< div class ="icon avatar-result-icon " item-icon > < img src$ ="[[item.imgUrl]] "> </ div >
302
272
</ template >
303
- < template is ="dom-if " if ="{{!item.imgUrl}} ">
273
+ < template is ="dom-if " if ="{{!item.imgUrl}} ">
304
274
< div class ="icon avatar-result-icon " item-icon > [[getInitialsFrom(item.text)]]</ div >
305
275
</ template >
306
- < paper-item-body >
307
- < div > [[item.text]]</ div >
308
- </ paper-item-body >
309
- </ paper-icon-item >
310
- </ template >
311
- </ template >
312
- < template is ="dom-if " if ="[[groupedSuggestions]] ">
276
+ < paper-item-body >
277
+ < div > [[item.text]]</ div >
278
+ </ paper-item-body >
279
+ </ paper-icon-item >
280
+ </ template >
281
+ </ template >
282
+ < template is ="dom-if " if ="[[groupedSuggestions]] ">
313
283
< template is ="dom-repeat " items ="{{_suggestions}} ">
314
284
< paper-icon-item class ="suggestion-item suggestion-group " tabindex ="-1 " disabled >
315
285
< template is ="dom-if " if ="[[item.groupIcon]] ">
316
286
< iron-icon class ="icon " icon ="[[item.groupIcon]] " item-icon > </ iron-icon >
317
287
</ template >
318
- < paper-item-body >
319
- < div > [[item.groupName]]</ div >
320
- </ paper-item-body >
321
- </ paper-icon-item >
322
- < template is ="dom-repeat " items ="{{item.items}} ">
288
+ < paper-item-body >
289
+ < div > [[item.groupName]]</ div >
290
+ </ paper-item-body >
291
+ </ paper-icon-item >
292
+ < template is ="dom-repeat " items ="{{item.items}} ">
323
293
< paper-icon-item class ="suggestion-item suggestion-group-item " data-key ="[[item.key]] " data-text ="[[item.text]] " data-tag$ ="[[item.tag]] " data-object ="[[item]] " on-mouseover ="_onMouseOverSelectable " on-tap ="_onTapSelectable " tabindex ="-1 " selectable-item >
324
294
< template is ="dom-if " if ="{{item.imgUrl}} ">
325
295
< div class ="icon avatar-result-icon " item-icon > < img src$ ="[[item.imgUrl]] "> </ div >
326
296
</ template >
327
- < template is ="dom-if " if ="{{!item.imgUrl}} ">
297
+ < template is ="dom-if " if ="{{!item.imgUrl}} ">
328
298
< div class ="icon avatar-result-icon " item-icon > [[getInitialsFrom(item.text)]]</ div >
329
299
</ template >
330
- < paper-item-body >
331
- < div > [[item.text]]</ div >
332
- </ paper-item-body >
333
- </ paper-icon-item >
334
- </ template >
335
- </ template >
336
- </ template >
337
- </ paper-autocomplete-results >
300
+ < paper-item-body >
301
+ < div > [[item.text]]</ div >
302
+ </ paper-item-body >
303
+ </ paper-icon-item >
304
+ </ template >
305
+ </ template >
306
+ </ template >
307
+ </ paper-autocomplete-results >
338
308
339
- </ paper-material >
309
+ </ paper-material >
340
310
</ template >
341
311
< script >
342
312
Polymer ( {
343
-
344
313
is : 'paper-input-autocomplete-chips' ,
345
314
346
315
behaviors : [
381
350
*/
382
351
selectedObjects : {
383
352
type : Array ,
384
- value :[ ] ,
353
+ value : function ( ) { return [ ] ; } ,
385
354
notify : true
386
355
} ,
387
356
/**
388
357
* The candidates from local variable.
389
358
*/
390
359
localCandidates :{
391
360
type :Array ,
392
- value :[ ]
361
+ value : function ( ) { return [ ] ; }
393
362
} ,
394
363
/**
395
364
* Hidden Input value.
758
727
} ,
759
728
760
729
_onBlur : function ( ) {
730
+ console . log ( '[_onBlur]' ) ;
761
731
this . _paperInputContainerElement . _handleValueAndAutoValidate ( this . _inputElement ) ;
762
732
} ,
763
733
817
787
} ,
818
788
} ) ;
819
789
</ script >
820
- </ dom-module >
790
+ </ dom-module >
0 commit comments