@bcrs-shared-components/base-address 2.1.0 → 2.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/BaseAddress.vue +4 -3
  2. package/package.json +2 -2
package/BaseAddress.vue CHANGED
@@ -261,8 +261,8 @@ export default class BaseAddress extends Mixins(ValidationMixin, CountriesProvin
261
261
  /** A unique id for this instance of this component. */
262
262
  uniqueId = uniqueId()
263
263
 
264
- /** Whether address form is valid. */
265
- addressFormValid = false
264
+ /** Whether address form is valid (True until proven False). */
265
+ addressFormValid = true
266
266
 
267
267
  /** Whether postal code validation rules are enabled (ie, after first blur or validate call). */
268
268
  postalCodeRulesEnabled = false
@@ -429,10 +429,11 @@ export default class BaseAddress extends Mixins(ValidationMixin, CountriesProvin
429
429
 
430
430
  /** Watches for changes to the address form validity and emits the updated state. */
431
431
  @Watch('addressFormValid')
432
+ @Watch('postalCodeRulesEnabled')
432
433
  @Emit('valid')
433
434
  onAddressFormValidChanged (): boolean {
434
435
  // form is valid only if postal code rules are enabled
435
- return (!this.$v.$invalid && this.postalCodeRulesEnabled)
436
+ return (this.addressFormValid && this.postalCodeRulesEnabled)
436
437
  }
437
438
 
438
439
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bcrs-shared-components/base-address",
3
- "version": "2.1.0",
3
+ "version": "2.1.2",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -14,5 +14,5 @@
14
14
  "vue-property-decorator": "^9.1.2",
15
15
  "vuelidate-property-decorators": "1.0.28"
16
16
  },
17
- "gitHead": "b76f47d6b97b9caf02baa98461dfcf5dc9526f7c"
17
+ "gitHead": "20ef4e10a0c5660986240ccdef7bbf134a844250"
18
18
  }