Open boxxxie opened 1 year ago
I have the same issue. If you can find where this happens and submit a PR to fix it, that would be great.
Removing my previous comment as this was the same issue I had.
ANOTHER WORKAROUND
I tried to debug your code but I can't really find where it assigned the selected attribute to each option. I tried changing all option to false but nothing happens.
However, I may have found another work around for this issue. To make a placeholder, put something like this
{key: null, value: 'Select Account Code ...', disabled: true, selected: true}
EXAMPLE:
tail.select(`.item_row select`, {
search: true,
searchFocus: true,
placeholder: 'Choose Item ...',
descriptions: true,
searchConfig: ['text', 'value', 'attributes'],
items: [{key: null, value: 'Select Account Code ...', disabled: true, selected: true}, { ... }, { ... }]
}))
})
i'll try out this workaround. i am suspicious as to it's behaviour with my server. however it's a lot cleaner than my solution of digging into random data and changing it.
in my example HTML i want tail to use the placeholder on init (no options are selected)
tails instead selects "Development" option
i have to use this workaround to fix it
example HTML:
got any idea where i should start investigating to make a PR?