Skip to content

Commit

Permalink
chore: update demo to use change event [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
web-padawan committed Mar 3, 2020
1 parent 87d7452 commit 25dc62b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions demo/radio-button-basic-demos.html
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,12 @@ <h3>Value change event</h3>
<vaadin-radio-button value="two">Option two</vaadin-radio-button>
<vaadin-radio-button value="three">Option three</vaadin-radio-button>
</vaadin-radio-group>
<div id="output">Selected value:</div>
<div>Selected value: <span id="output"></span></div>
<script>
window.addDemoReadyListener('#value-change-event', function(document) {
const radioButtonGroup = document.querySelector('vaadin-radio-group');
const output = document.querySelector('#output');
radioButtonGroup.addEventListener('value-changed', function(event) {
radioButtonGroup.addEventListener('change', function(event) {
output.textContent = radioButtonGroup.value;
});
});
Expand Down

0 comments on commit 25dc62b

Please sign in to comment.