Polymer input change event

前端 未结 5 1712
独厮守ぢ
独厮守ぢ 2021-02-05 20:42

All I want is to be able to get the input from a polymer element and alert it onchange WITHOUT creating a custom polymer element.

issues: on-change

5条回答
  •  南笙
    南笙 (楼主)
    2021-02-05 21:12

    element will fire 'value' property change event (a non-bubbling DOM event when a 'value' property changes)

    elements declaration:

    
    

    event handling:

    _onSearchTermChanged: function (event) {
         console.log(event.detail.value);
     }
    

    For more details check Polymer's Change Notification Events

提交回复
热议问题