Open alvarotrigo opened 15 hours ago
As a workaround I'm forced to do this now:
function sampleLabelRenderer(data) {
var optionItem = document.querySelector('.vscomp-option-text[data-tooltip="'+data.label+'"]').parentNode;
var domIndex = Array.prototype.indexOf.call(document.querySelectorAll('.vscomp-option'), optionItem.parentNode);
console.log(domIndex);
}
For some reason the visible index is always the same as the index on the
data
coming fromlabelRenderer
andsampleLabelRenderer
.Shouldn't one of those values reflect the value of the dropdown item on the DOM?
Demo here (Scroll until the last item on the list) https://jsfiddle.net/1be6ps5g/
Code for reproduction: