1
votes

Is there a way to make the a list item become selected when clicking the disclosure icon? Currently it doesn't seem to select the item and I'd like it to behave exactly as it would if I had selected the list item.

There doesn't seem to be a way of doing this within the docs for this.

2

2 Answers

3
votes

I worked it out. In the controller:

onTaskListItemDisclose: function (scope, record, target, index) {
    console.log("onTaskListItemDisclose");

    scope.select(record);
},

Its as simple as using the passed in scope variable which holds the list and calling select() with the record id of the item.

0
votes

If I understood correctly, you are trying to fire an action when the disclose icon is clicked in the list item.

It can be done with the help of disclose event listener as below.

disclose : function(view, record, target, index) 
{
    console.log('this is clicked');
    // calling controller's function 
    this.fireEvent('actionSelected', view, record, target, index);
}