We know that Tool can have many inputs (e.g. Table or Nested List). So it would be better to add a single event listener in the adapter's constructor. And then, find and handle events related to attached inputs.
Probably, we will need to store inputs in a private property.
Right now each call of the
attachInput()
lead adding the new event listener to the model. Then, handler will filter-our other inputs.We know that Tool can have many inputs (e.g. Table or Nested List). So it would be better to add a single event listener in the adapter's constructor. And then, find and handle events related to attached inputs.
Probably, we will need to store inputs in a private property.