Open datatable suggest on click

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?

Good day, @Christiaan
The text widget and editor: “text’” are rather different in purpose and how they work and what are made up of.
In your case you can create the SuggestList and bind it to the editor input via linkInput() and then show it near the specified node in onAfterEditStart event. You can read more hear: Suggest list for component editors section .
Please, check the example: Code Snippet
By the way, there is also an option to create your own custom editor with the needed logic.

Perfect, thanks! The snippet works for me