Sum a field across DataGrid selectedRows - 'on click' bug?

selected rows is generated by the grid component.
If you are not using the grid component but use a collection list or repeated items in a container yuo can keep track of selected items by yourself with a workflow like this example