Skip to content
This repository was archived by the owner on Jun 27, 2023. It is now read-only.

Commit 229d196

Browse files
committed
fix: custom-field on change
1 parent 2b89980 commit 229d196

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

dev/typescript/App.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,10 @@ export default defineComponent({
9090
const title = ref('Vue Dynamic Forms');
9191
const formValues = reactive({});
9292
let consoleOptions = ref();
93-
const emailValidator: FormValidator = {
93+
const emailValidator: FormValidator = Validator({
9494
validator: email,
9595
text: 'Email format is incorrect',
96-
};
96+
});
9797
9898
const emailUniquenessValidator: FormValidator = {
9999
validator: value =>

src/components/dynamic-input/DynamicInput.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ export default defineComponent({
6363
components,
6464
props,
6565
setup(props, { emit, slots }) {
66-
const { onFocus, onBlur } = useInputEvents(props?.control, emit);
66+
const { onFocus, onInput, onChange, onBlur } = useInputEvents(props, emit);
6767
6868
let component;
6969
@@ -180,7 +180,7 @@ export default defineComponent({
180180
},
181181
slots.customField({
182182
control: props.control,
183-
onChange: valueChange,
183+
onChange: onInput,
184184
onFocus,
185185
onBlur,
186186
}),

0 commit comments

Comments
 (0)