Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates #13

Merged
merged 5 commits into from
Apr 16, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add emit
gesseekur committed Apr 16, 2020
commit 4b1d061a3acc60fa146759efd3a8aef466d66d0e
4 changes: 3 additions & 1 deletion src/components/AddressSelect/AddressSelect.vue
Original file line number Diff line number Diff line change
@@ -10,6 +10,7 @@
:placeholder="placeholder"
:menu-props="{ value: autoSelectMenu, closeOnClick: true }"
ref="addressInput"
return-object
outlined
>
<template v-slot:prepend-inner>
@@ -117,7 +118,8 @@ export default {
},
selectAddress(data) {
this.autoSelectMenu = false;
this.addressValue = data.address;
this.addressValue = data;
this.$emit("emitSelectedValue", data);
}
}
};
9 changes: 7 additions & 2 deletions stories/AddressSelector/AddressSelector.stories.js
Original file line number Diff line number Diff line change
@@ -34,9 +34,14 @@ export const AddressSelector = () => ({
template: `
<div>
<br />
<address-selector :label="label" :items="items">
<address-selector @emitSelectedValue="getSelectedValue" :label="label" :items="items">
<template v-slot:blockie>
</template>
</address-selector>
</div>`
</div>`,
methods: {
getSelectedValue(value) {
console.log("selected value:", value);
}
}
});