-
Notifications
You must be signed in to change notification settings - Fork 532
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
Property or method "debouncedValidate" is not defined on the instance but referenced during render #345
Comments
You didn't define it. It's not a property defined in abstractField, it's part of the computed value. When adding your custom field to the form, just provide a Take a look at Looks like you're trying to mask the input entered, which can be done using the |
I'll take a look on it. thank you! |
I rewrite my custom filed in the following way with some console.log() to test.
|
Can you provide a JSFiddle of this? I copied your custom field to my project and used it, ... I got an error about the "getConfig" as |
here is the jsfiddle:https://jsfiddle.net/egfkqt7a/
However, when I import the customField component from another file like the
|
@gezichenshan how do I reproduce the error using your Fiddle? When I enter values into your Postcode field all I get is 99999 and 77777 output to the console depending on the input. No errors about debounceValidate. |
@zoul0813 Yes , in Fiddle there is no errors. I've explained in my last comment that if I use the Postcode field by importing it from another file, the errors show. |
@gezichenshan I copied everything over to a local project, and imported the "fieldPostcode.vue" file and am still unable to reproduce the issue you're reporting. Without a JSFiddle/Plunker showing the error or a git repo that can be cloned and tested ... I can't help you. Are you using the latest version of VFG (2.1.1) ? |
Yes I'm using the latest version 2.1.1.
fieldPostcode.vue:
Reg1.vue:
If I use the fieldPostcode by importing it from another file fieldPostcode.vue, the error shows. By If I did it in the following way within a single file,there is no errors. I don't know the differences.
Thank you for your help. If you cannot reproduce my error, that's ok, let's make it done! I appreciate your kindness . |
I'm still not able to reproduce the error. However, you're Reg1.vue file is incomplete and I had to make some assumptions about how you declared the ... I went with ...
You shouldn't be getting errors about
Even when I pass a formOptions object as |
@zoul0813 Hi, I created a project on github to reproduce the error. You may check it out if it is convenient for you. |
I can reproduce the error in your project, ... taking a look at it now. |
Ok, I think I've tracked the issue down ... it looks like the older version of Vue that VFG was originally written against supported adding methods to the Vue components dynamically. However, the newer version of Vue is throwing errors because "debouncedValidate" is not defined in the component, as it was being attached only in certain situations. This seems to only occur if you're using a newer version of Vue than VFG was intended for. Working on a fix now. |
* feature/345-debounced-validate-fix: remove uniqueId import fixes vue-generators#345 - declare debouncedValidateFunc and set it when debouncedValidate() is called... vue 2.2.0 prevents you from attaching methods/properties to components that have not been declared
* feature/345-debounced-validate-fix: remove uniqueId import fixes vue-generators#345 - declare debouncedValidateFunc and set it when debouncedValidate() is called... vue 2.2.0 prevents you from attaching methods/properties to components that have not been declared
fixes #345 - declare debouncedValidateFunc
@zoul0813 Thank you very much! |
I've created a custom field for postcode. but I got error in console."Property or method "debouncedValidate" is not defined on the instance but referenced during render "
something i missed?
The text was updated successfully, but these errors were encountered: