diff --git a/apiExamples/dynamicMenu.js b/apiExamples/dynamicMenu.js
index 03f7859..759520c 100644
--- a/apiExamples/dynamicMenu.js
+++ b/apiExamples/dynamicMenu.js
@@ -41,12 +41,15 @@ function generateMenuOptionHtml(menu, label, value) {
menu.appendChild(option);
}
-// Main function that runs all JS to create example
-export async function populateCombobox(elem) {
- const dynamicData = new DynamicData();
+// Main javascript that runs all JS to create example
+const dynamicData = new DynamicData();
+const dynamicMenuExample = document.querySelector('#dynamicMenuExample');
- let data = await dynamicData.getData();
- data = dynamicData.filterData(data, elem.value);
+const input = dynamicMenuExample.shadowRoot.querySelector('auro-dropdown').querySelector('auro-input');
+
+input.addEventListener('input', () => {
+ let data = dynamicData.getData();
+ data = dynamicData.filterData(data, dynamicMenuExample.value);
generateHtml(data);
-}
+});
diff --git a/apiExamples/focus.js b/apiExamples/focus.js
index 46470b2..4561b90 100644
--- a/apiExamples/focus.js
+++ b/apiExamples/focus.js
@@ -1,7 +1,8 @@
-export function focus(elem) {
+// export function focus(elem) {
+ const focusExample = document.querySelector('#focusExample');
const focusExampleBtnElem = document.querySelector('#focusExampleBtn');
focusExampleBtnElem.addEventListener('click', () => {
- elem.focus();
- })
-}
+ focusExample.focus();
+ });
+// }
diff --git a/apiExamples/persistent.js b/apiExamples/persistent.js
index 3710f2d..d097859 100644
--- a/apiExamples/persistent.js
+++ b/apiExamples/persistent.js
@@ -1,6 +1,8 @@
-export function persistentEventOption(elem) {
- elem.addEventListener('addNewAddress', () => {
- console.warn('addNewAddress event fired');
- alert(`addNewAddress event fired`);
- });
-}
+const persistentExample = document.querySelector('#persistent');
+
+console.log(persistentExample);
+
+persistentExample.addEventListener('addNewAddress', () => {
+ console.warn('addNewAddress event fired');
+ alert(`addNewAddress event fired`);
+});
diff --git a/apiExamples/swapValue.js b/apiExamples/swapValue.js
index 33d17f4..426debf 100644
--- a/apiExamples/swapValue.js
+++ b/apiExamples/swapValue.js
@@ -1,13 +1,15 @@
-export function swapComboboxValues(selectors) {
- const btn = document.querySelector(selectors[0]);
- const comboboxOne = document.querySelector(selectors[1]);
- const comboboxTwo = document.querySelector(selectors[2]);
+const btn = document.querySelector('#swapExampleBtn');
+const comboboxOne = document.querySelector('#swapExampleLeft');
+const comboboxTwo = document.querySelector('#swapExampleRight');
- btn.addEventListener('click', () => {
- const valueOne = comboboxOne.value;
- const valueTwo = comboboxTwo.value;
+console.log("hello");
+console.log(btn);
- comboboxOne.value = valueTwo;
- comboboxTwo.value = valueOne;
- });
-}
+btn.addEventListener('click', () => {
+ console.log("btn clicked");
+ const valueOne = comboboxOne.value;
+ const valueTwo = comboboxTwo.value;
+
+ comboboxOne.value = valueTwo;
+ comboboxTwo.value = valueOne;
+});
diff --git a/apiExamples/value.js b/apiExamples/value.js
index 170781a..584a3ca 100644
--- a/apiExamples/value.js
+++ b/apiExamples/value.js
@@ -1,14 +1,13 @@
-export function initValueExamples(elem) {
- document.querySelector('#valueValidExampleBtn').addEventListener('click', () => {
- elem.value = 'Oranges';
- })
+const valueExample = document.querySelector('#valueExample');
- document.querySelector('#valueInvalidExampleBtn').addEventListener('click', () => {
- console.warn('dragon fruit', elem);
- elem.value = 'Dragon Fruit';
- })
+document.querySelector('#valueValidExampleBtn').addEventListener('click', () => {
+ valueExample.value = 'Oranges';
+});
- document.querySelector('#valueUndefinedExampleBtn').addEventListener('click', () => {
- elem.value = undefined;
- })
-}
+document.querySelector('#valueInvalidExampleBtn').addEventListener('click', () => {
+ valueExample.value = 'Dragon Fruit';
+});
+
+document.querySelector('#valueUndefinedExampleBtn').addEventListener('click', () => {
+ valueExample.value = undefined;
+});
diff --git a/demo/api.html b/demo/api.html
index f3d94f3..779a5b4 100644
--- a/demo/api.html
+++ b/demo/api.html
@@ -32,27 +32,20 @@
-
-
-
+
+