[Vuejs]-How can I call a method in Vue while the rendering takes place

1👍

Now it is working as expected.
Due to the comments, here I had to remove the semicolon:

<input :allowedfunctions="getAllowedFunctions(data.functions)" />

And further, the function must be implemented as ‘method’ and not as ‘computed’:

methods: {
    getAllowedFunctions(functions: any) {
      if (functions) {
        return functions.function.map(function(e: any) { return e.name }, functions.function).join(',');
      }
    }
}

Leave a comment