-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(example): add additional functionality to value example #89
- Loading branch information
1 parent
9ec5e17
commit af82cee
Showing
9 changed files
with
158 additions
and
56 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<auro-button id="validValueExampleBtn">Set Value to Valid Option</auro-button> | ||
<auro-button id="invalidValueExampleBtn">Set Value to Invalid Option</auro-button> | ||
<auro-button id="undefinedValueExampleBtn">Set Value to Undefined</auro-button> | ||
<br/><br/> | ||
<auro-select id="valueExample" value="price"> | ||
<span slot="label">Name</span> | ||
<auro-menu> | ||
<auro-menuoption id="option-0" value="stops">Stops</auro-menuoption> | ||
<auro-menuoption id="option-1" value="price">Price</auro-menuoption> | ||
<auro-menuoption id="option-2" value="duration">Duration</auro-menuoption> | ||
<auro-menuoption id="option-3" value="departure">Departure</auro-menuoption> | ||
<auro-menuoption id="option-4" value="arrival">Arrival</auro-menuoption> | ||
<auro-menuoption id="option-5" value="prefer alaska">Prefer Alaska</auro-menuoption> | ||
</auro-menu> | ||
</auro-select> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
setTimeout(() => { | ||
const valueValidExampleBtnElem = document.querySelector('#validValueExampleBtn'); | ||
const valueInvalidExampleBtnElem = document.querySelector('#invalidValueExampleBtn'); | ||
const valueUndefinedExampleBtnElem = document.querySelector('#undefinedValueExampleBtn'); | ||
const valueExampleElem = document.querySelector('#valueExample'); | ||
|
||
if (valueExampleElem && valueValidExampleBtnElem) { | ||
valueValidExampleBtnElem.addEventListener('click', () => { | ||
valueExampleElem.value = 'arrival'; | ||
}) | ||
} | ||
|
||
if (valueExampleElem && valueInvalidExampleBtnElem) { | ||
valueInvalidExampleBtnElem.addEventListener('click', () => { | ||
valueExampleElem.value = 'flight course'; | ||
}) | ||
} | ||
|
||
if (valueExampleElem && valueUndefinedExampleBtnElem) { | ||
valueUndefinedExampleBtnElem.addEventListener('click', () => { | ||
valueExampleElem.value = undefined; | ||
}) | ||
} | ||
}, 200) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.