Multiselect - query API


In the multiselect tutorial, in the part that shows how to use a JSON file via the API, we have a list of companies and their products.
We see how to call the names of the companies.

query: Companies
    text: "{{ }}"
    value: "{{ }}"

Is it possible to do the same for product names ? List all products in the multiselect choices, regardless of brand?


I tried that before, but it doesn’t work.
The multiselect field is empty (no error message).

Here is the tested code. works but not


It might make sense to use two different routes and return the data you need for the subcategories from that second route, i.e. a flat list of all products in the example.

Not related to your
One problem I see with your category/subcategory approach is that users could select Apple as category and then Windows as subcategory, if the subcategory list is not filtered.

Thanks for the answer.

For filtering by category/subcategory, I saw that the best solution was to make a custom selection field. It’s in the works, but, not being very comfortable with Vue at the moment, I’m trying to find an intermediate solution.

So, with your answer, I could do what I had in mind!

Via the panel, the user enters the categories and sub-categories.
I transform the data into JSON :
transfo json

It works pretty well.
I just have another problem :stuck_out_tongue: If you have the answer…
I have empty data that appears as a proposal in my select and multiselect:

Here my JSON: