Sidebar/list select method - can we add config parameter?

The text (and derived classes) setValue method has a 2nd parameter for config object which will be sent to the onChange event. This is very helpful in event handling for onChange because it can react to the event depending on where the event came from.

Is there a way to achieve the same for sidebar/list select method so that we can have additional info when handling the onAfterSelect event?

Thanks in advance…

Unfortunately there is no way to provide context for the selection API.
Still, the event processing is synchronous operation, so next can be used

list.config.$selectSource = "myCode";
list.select(1);
delete list.config.$selectSource

list.config can contain any flags, and from event handler you can check it like this.config.$selectSource

Thanks… it feels a bit “hacky” but I will try it.