drop down menu - Value of dynamic dropdown to push to firebase DB in polymer -


i need value of dynamic dropdown. other fields use .value , work. when try value of dropdown, error in console log ... 'cannot read property 'value' of undefined'.
html looks this....

div class="">     <paper-input id="pxname" label="patient name"></paper-input>     <paper-input id="pxapttime" label="appointment time"></paper-input>     <paper-input id="pxlocation" label="location"></paper-input>     <paper-dropdown-menu label="doctors">         <paper-listbox slot="dropdown-content" class="dropdown-content">             <template is="dom-repeat" items="[[doctors]]" as="dr">                 <paper-item id="pxprovider">[[dr.name]]</paper-item>             </template>          </paper-listbox>     </paper-dropdown-menu>     <div id="px-input">         <paper-button raised id="addpatient" on-tap="addpatient">add patient</paper-button>     </div> </div> 

and function posting looks this....

addpatient: function () {             // console.log(this.$.pxprovider.value);             this.$.patients.ref.push({                 name: this.$.pxname.value,                 apttime: this.$.pxapttime.value,                 location: this.$.pxlocation.value,                 provider: this.$.pxprovider.value             }) 

any appreciated.

i have resolved issue moving location of 'id' paper-item paper-dropdown-menu. captures value , posts database correctly now.

<paper-dropdown-menu id="pxprovider" label="doctors">         <paper-listbox slot="dropdown-content" class="dropdown-content">             <template is="dom-repeat" items="[[doctors]]" as="dr">                 <paper-item >[[dr.name]]</paper-item>             </template>         </paper-listbox>     </paper-dropdown-menu> 

Comments

Popular posts from this blog

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

python Tkinter Capturing keyboard events save as one single string -

sql server - Why does Linq-to-SQL add unnecessary COUNT()? -