Skip to content
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

Custom element fix #10

Open
electromuis opened this issue Feb 8, 2019 · 1 comment
Open

Custom element fix #10

electromuis opened this issue Feb 8, 2019 · 1 comment

Comments

@electromuis
Copy link

I had an issue with this config

data () {
            return {
                valid: false,
                success: false,
                loading: true,
                message: "",
                model: {
                    tournamentManagers: []
                },
                schema: {
                    fields: [
                        {
                            type: "array",
                            model: "tournamentManagers",
                            items: {
                                type: "select",
                                values: []
                            }
                        }
                    ]
                },
                formOptions: {
                    validateAfterLoad: true,
                    validateAfterChanged: true,
                    validateAsync: true
                }
            }
        },

It told me it couldnt find the element "field-select", which comes from

getFieldType(fieldSchema) {
        return "field-" + fieldSchema.type;
      },

Thats becuase the components property in the array element is not there, fixed by by ovveriding that at import

import fieldArray from "vfg-field-array/src/components/field-array.vue";

import fieldComponents from "vue-form-generator/src/utils/fieldsLoader.js";
fieldArray.components = fieldComponents

Vue.component("fieldArray", fieldArray);

But of course it would be better if this could be fixed in the module itself

@gwenaelp
Copy link
Owner

Hello,

I'll have a look at it and see what I can do! Thank you for the feedback!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants