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
FormKitSchema missing to set instanceScopes
when schema
changed
#610
Comments
@justin-schroeder sorry to bother you but this is quite urgent for my project, could you take a look at this issue? |
Perhaps there is a bug here, will need further investigation — however, you really shouldn't need to modify the schema hardly ever. That watcher is in there as a concession that for some applications it may be useful to modify the schema, but you do take a pretty sizable performance hit to do so. As a workaround consider iterating over data and pushing onto that data instead. |
@justin-schroeder how to deal with a dynamic schema like adding more fields to a group? E.g: // Add this field to the form in runtime
{
$cmp: "CustomField",
props: {
name: "test",
type: "CCustomCheckbox",
label: "test",
},
} |
Have a component that gets |
@GustavoFenilli thanks for your suggestion! Could you provide some sample code? Sure, we can loop through the Recently, this is my main concern about the schema approach of this library Thanks! |
|
Reproduction
https://formkit.link/26044964938a01897a2ff6355c180b53
Describe the bug
I have a plugin to translate the labels and placeholders, but when the schema is updated, it was not called then the labels and placeholders are empty, refer to the reproduction link for details.
I investigated in the
packages/vue/src/FormKitSchema.ts
, you are watching theprops.schema
, but in the watching's handler, you don't set theinstanceScopes
to the newinstanceKey
Please check it to see if it's a bug, if it is, I can create a PR to fix this issue if needed.
Thanks!
Environment
• OS: Mac OS
• Browser chrome
• Version 1.0.0-beta.15
The text was updated successfully, but these errors were encountered: