Skip to content
This repository was archived by the owner on Feb 20, 2024. It is now read-only.

Support correct postal code events. #25

Merged
merged 1 commit into from
Jan 3, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 2 additions & 4 deletions src/PostalCode.vue
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
<template>
<stripe-element
ref='element'
type='postalCode'
:stripe='stripe'
:value='value'
:options='options'
@blur='$emit("blur")'
@focus='$emit("focus")'
@empty='$emit("empty")'
@complete='$emit("complete")'
@brand='$emit("brand", $event)'
@error='$emit("error", $event)'
@value='$emit("value", $event)'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nkoehring, do you remember why does PostalCode.vue contain there listeners?

@complete='$emit("complete")'
@brand='$emit("brand", $event)'
@error='$emit("error", $event)'
@value='$emit("value", $event)'

I like the idea of replacing them with single @change but not sure if it is safe for those who will update the module

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@softbeehive this was just to bring them inline with the other components, which all use the same change event. Based on the commit message it seemed like they all used to have multiple events and this one was just missed?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's what it seems to me too, will test it and release if all good

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I remembered I could check git logs too. This looks like where they got out of sync. 5218fbc#diff-25d902c24283ab8cfbac54dfa101ad31

@change='$emit("change", $event)'
/>
</template>

Expand Down
2 changes: 2 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import './lib'
import { Stripe, baseStyle } from './stripeElements'
import StripeElement from './StripeElement'
import Card from './Card'
import CardExpiry from './CardExpiry'
import CardCvc from './CardCvc'
Expand All @@ -12,6 +13,7 @@ module.exports = {
CardExpiry,
CardCvc,
PostalCode,
StripeElement,
baseStyle,
get instance() { return Stripe.instance },
get createToken() { return Stripe.createToken },
Expand Down