I’m using a text editor with a suggest in a datatable. This is all works well but I’d like the suggest to open when clicked. Now it only opens when the user starts typing.
With a normal (non datatable) text with suggest, I can do the following:
{
view: 'text',
type: 'list',
on: {
onItemClick: function () {
$$(this.config.suggest).config.master = this
$$(this.config.suggest).show(this.$view)
}
}
}
But I can’t get this to work for a datatable editor. I tried this:
onAfterEditStart: function (state: { row, column}) {
if (state.column === 'mycolumn') {
const col = this.getColumnConfig('mycolumn')
const suggest = $$(col.suggest)
if (suggest) {
suggest.config.master = this
suggest.show()
}
}
}
This opens the suggest popup but in the wrong place and clicking a result does not fill it in the text editor, so this isn’t quite the right way to do it.
Any suggestions?