DEV Community

Diyar Polat
Diyar Polat

Posted on

How to I add Tom Select to a fetched Data?

Hello Folks,

I have created a form and I am trying to add fetched data from an Api to the options field.

Below is my website link. I have put 2 different examples below each other. you can scroll down the page and be able to see what I mean.

I used this example code but it did not work.

new TomSelect("#makeField", {
sortField: {
field: "text",
direction: "desc",
},
});

https://pyro.design/

Top comments (0)