Skip to content
Advertisement

Passing options containing blank spaces from Laravel blade to Vue multiselect

I’m trying to use Vue Multiselect in my Laravel blade file. I am putting the data in array and pass it in options as props. When option is one word(ex. “View”) everything is working. But when the option contains multiple words(ex. “View customer”) I am receiving the following error: enter image description here

When I print the json array, the data is shown as it should: enter image description here

In my blade file:

JavaScript

Vue grouped-multiselect:

JavaScript

Any ideas what’s the problem and how can I fix it? Thank you

Advertisement

Answer

I solved the problem. In case somebody have the same issue, I just added double quotes

JavaScript
User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement