Search This Blog

Monday, July 21, 2014

Polymer.Dart Core Elements in Codelab

I worked on adding core-elements to a Codelab.  I replaced textarea's with core-inputs.  Some lessons learned.
  1. Only the 'on-validate' method fires after every key stroke.
  2.  I haven't gotten multiline to work yet.  The input looks like a text input.  I suspect the CSS style, but I disabled most (all) of the CSS.
  3. Focus and text styling is different than the textarea input.  I am still trying to figure out how to style elements in the shadow-DOM.
Top - core-input.  Bottom - Textarea.  Notice the text fonts aren't the same.


After I got the core-input working.  I tried to implement core-list. 

I have a list of Codelabs that I input into the data attribute of the core-list element.  I want to repeat a custom polymer element.  I need to feed the custom element a single Codelab.  I had success accessing a Codelab fields, but I when I try to pass Codelab, I am unable.  I could deconstruct the element a little and pass the fields I want to access.  That would work for this simple example, but doesn't seem to scale well. 

No comments:

Post a Comment