You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It'd be nice to be able to get the DOM item on the labelRenderer callback.
So we can apply modifications to it if we need to.
Right now I'm doing the following, but when scrolling up & down very fast it won't find the optionItem by the data-visible-index class. I guess because probably it's not yet created on the DOM.
labelRenderer: sampleLabelRenderer,selectedLabelRenderer: sampleLabelRendererfunctionsampleLabelRenderer(data){letprefix='';if(!data.isCurrentNew&&!data.isNew){varoptionItem=document.querySelector('.vscomp-option[data-visible-index="'+data.visibleIndex+'"]');//fails to get the itemif(!optionItem){console.error("sale...");console.log(data.label);return`${prefix}${data.label}`;}console.log("vaa...");}else{}return`<span style="${styles}">${prefix}${data.label}</span>`;}
The text was updated successfully, but these errors were encountered:
It'd be nice to be able to get the DOM item on the
labelRenderer
callback.So we can apply modifications to it if we need to.
Right now I'm doing the following, but when scrolling up & down very fast it won't find the
optionItem
by thedata-visible-index
class. I guess because probably it's not yet created on the DOM.The text was updated successfully, but these errors were encountered: