tail.select.js icon indicating copy to clipboard operation
tail.select.js copied to clipboard

multi-select gets values of options and show them

Open saramansouri opened this issue 2 years ago • 1 comments

I want this multi-select to get an array of values and show the options but it doesn't work even for showing one option. Could you please help me with this? thanks in advanced

saramansouri avatar Mar 06 '23 09:03 saramansouri

If this is PHP, you first need to build the <select> element, and then call tail.select() on it.

If this is JavaScript, it's the same, you need to build all options from an array and then call tail.select(). If the array is coming from an external URL, you might need to use an await function, or a Promise. Otherwise, just make sure the <select> element exists before calling tail.select().

wolffe avatar Mar 06 '23 09:03 wolffe