Autocomplete suggestion element in CM v6

I need to display my function list in autocomplete list. While hovering that list. I want to show my custom tooltip info. Is there any possible to acheive it.

In CM v5, I have used ‘shown’ event to get suggestion UL tag. So, I easy added my mouseenter event in each li tag. In CM v6, ‘shown’ event becomes deprecated. Also, I have used updatelistener with checked completionStatus(update.state) === ‘active’. But I didnt able to get UL tag from update instance

Any update guys ?

You could query view.dom.querySelector(".cm-tooltip-autocomplete"), if you didn’t specify an alternative root element for your tooltips.

1 Like

I have used below code to acheive it. Is this fine ?
const completionConfig = autocompletion(autocompleteConfig);
const [, completionState] = completionConfig;
this.completionState = completionState;

getAutoCompleteObj() {
const state = this.state.field(this.completionState, false);
if(state && state.tooltip && state.open) {
const tooltipConfig = state.tooltip;
return {
toolTipEl: getTooltip(this, tooltipConfig),
dataObj: state.open
};
}
return null;
}