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

Items within an array of objects do not work in options #48

Closed
zahovicS opened this issue Jun 5, 2024 · 3 comments
Closed

Items within an array of objects do not work in options #48

zahovicS opened this issue Jun 5, 2024 · 3 comments

Comments

@zahovicS
Copy link

zahovicS commented Jun 5, 2024

// users array
const users = [
    {
        "key": "cashier test",
        "value": 3
    }
]

tail.select(".select-users", {
        multiple: true,
        animate: true,
        multiTags: false,
        multiCounter: false,
        theme: 'light',
        classNames: "w-100",
        items: users,
 })

version: 1.0.2

@wolffe
Copy link
Owner

wolffe commented Jun 6, 2024

You need to create the <select> element first.

You can use either JavaScript, or any server-side language you are familiar with.

@wolffe wolffe closed this as completed Jun 6, 2024
@zahovicS
Copy link
Author

Yes, that's what I did, I created an empty select but it still doesn't work, I had to make a query and construct the <option> to put them inside the selects and then start tail

@wolffe
Copy link
Owner

wolffe commented Jun 10, 2024

First you build the <select> element, then you trigger tail().

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