-
Notifications
You must be signed in to change notification settings - Fork 7
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
Missing function form for clearInlineFunctions
regex
#76
Comments
I am unable to reproduce this issue: |
That's because you're not writing it in the same way in the test. You are writing
Whereas you should be writing:
|
Did it both ways, the result is the same. using shorthand does not change the output of the snapshot |
It must be some difference in how the Vue files are compiled in your tests vs my tests |
That could be the case. This repo should be roughly equivalent to the average Vue-CLI repo. It should be using babel and vue-template-compiler. But it is missing webpack, since this repo does not run a server locally or do a web app build. If you can find out what the difference is, we may be able to add that into the repo to better simulate the dev environment. It may also help to explain the discrepancy in rendering slots, seen in #48. |
I am also suddenly having trouble with the const numberValidation = computed(() => props.validateForm
? [
(v: string) => !isEmpty(`${v}`) || i18n.t('validation.required'),
(v: string) => parseFloat(v) > 0 || i18n.t('validation.notZero')
]
: []
) passed in the template as <v-textfield
...
:rules="numberValidation"
/> becomes <div class="v-input v-input--hide-details v-input--is-label-active v-input--is-dirty theme--light v-text-field v-text-field--enclosed v-text-field--outlined" hide-details="auto" label="quotes.modal.line_info.price" outlined rules="(v) => {
return (
(cov_pmploy7k8().b[3][0]++, !(0, _isEmpty.default)(`${v}`)) ||
(cov_pmploy7k8().b[3][1]++, i18n.t('validation.required'))
);
},(v) => {
return (
(cov_pmploy7k8().b[4][0]++, parseFloat(v) > 0) ||
(cov_pmploy7k8().b[4][1]++, i18n.t('validation.notZero'))
);
}"> I realize these technically aren't functions but arrays of functions, but it used to work without problems. Is there anything in the recent updates that changed the rules in this regard? For now I have solved this by adding "rules" to |
@dschreij What do you mean by "recent update". The last release of this library was 281 days ago. Can you specify what version you were using before and what version you are on now? All changes (and code diffs) are thoroughly documented on the releases page: Your code examples are good. Pointing to computed and props specifically may lead to being able to reproduce this. |
Apologies. I didn't actually check if there was an update, I recently did an |
This is a prop that comes from a default value of a prop:
It gets printed like so:
And the regex used to remove functions when
clearInlineFunctions
is set does not pick this up.The text was updated successfully, but these errors were encountered: