Reputation: 27350
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.
Upvotes: 1
Views: 798
Reputation: 5802
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);
}
Upvotes: 0
Reputation: 27350
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.
Upvotes: 3