Kanban this.myview is not defined

Hi all,

I am using the Kanban and want a window to popup when I click an item.

My init…

init(){
 this.viewtask= this.ui(ViewTaskPopup);
}

The onListItemClick function of the Kanban…
this.viewtask.showWindow();

It does not like that, keeps giving me an undefined error on the this.viewtask

Any ideas?

Hi,

Such use-case is valid, but please check if the needed methods are declared in a right place.

For example, in kanban JetView class (assuming that getRoot returns the kanban view):

    this._window = this.ui(ViewTaskPopup);
    this.on(this.getRoot(), "onListItemClick", ()=>{
      this._window.showWindow()
    })

and in ViewTaskPopup class (which config returns a window/popup):

  showWindow(){
    this.getRoot().show();
  }

Here’s also an example of implementation: Code Snippet

that’s it, thanks