Skip to content

Commit

Permalink
Merge pull request #39 from homeday-de/develop
Browse files Browse the repository at this point in the history
[Release] Bugfixes: HdPasswordConfirm, HdDynamicForm
  • Loading branch information
ilyasmez authored Apr 8, 2019
2 parents e504cf2 + bccc16e commit 0538871
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 13 deletions.
4 changes: 2 additions & 2 deletions src/components/HdEditSwitch.vue
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,8 @@ export default {
};
},
watch: {
editing() {
this.isEditMode = this.editing;
editing(value) {
this.isEditMode = value;
},
},
computed: {
Expand Down
9 changes: 9 additions & 0 deletions src/components/form/HdDynamicForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ import HdInput from 'hd-blocks/components/form/HdInput.vue';
import HdCheckbox from 'hd-blocks/components/form/HdCheckbox.vue';
import HdRadio from 'hd-blocks/components/form/HdRadio.vue';
import HdPasswordConfirm from 'hd-blocks/components/form/HdPasswordConfirm.vue';
import HdTextarea from 'hd-blocks/components/form/HdTextarea.vue';
import HdSelect from 'hd-blocks/components/form/HdSelect.vue';
import HdTagsSelector from 'hd-blocks/components/form/HdTagsSelector.vue';
export default {
name: 'HdDynamicForm',
Expand Down Expand Up @@ -101,6 +104,12 @@ export default {
return HdRadio;
case 'passwordConfirm':
return HdPasswordConfirm;
case 'textarea':
return HdTextarea;
case 'select':
return HdSelect;
case 'tagsSelector':
return HdTagsSelector;
default:
return null;
}
Expand Down
11 changes: 4 additions & 7 deletions src/components/form/HdPasswordConfirm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,11 @@ export default {
};
},
watch: {
value() {
this.passwordMain = this.value;
value(value) {
this.passwordMain = value;
},
passwordMain() {
passwordMain(value) {
this.$emit('input', value);
this.$nextTick(this.validate);
},
passwordConfirm() {
Expand All @@ -100,10 +101,6 @@ export default {
},
},
methods: {
fieldDataChange() {
this.$emit('input', this.passwordMain);
this.$nextTick(this.validate);
},
validate() {
const inputsAreMatching = this.checkPasswordMatching();
const passwordIsLongEnough = this.checkPasswordLength();
Expand Down
4 changes: 2 additions & 2 deletions src/components/form/HdSelect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ export default {
},
},
watch: {
value() {
this.currentValue = this.value;
value(value) {
this.currentValue = value;
},
currentValue() {
this.handleChange();
Expand Down
4 changes: 2 additions & 2 deletions src/components/form/HdTagsSelector.vue
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ export default {
},
},
watch: {
value() {
this.selectedTags = this.value;
value(value) {
this.selectedTags = value;
},
},
mounted() {
Expand Down

0 comments on commit 0538871

Please sign in to comment.