add action

This commit is contained in:
Max Sokolov 2016-07-16 01:33:59 +03:00
parent 9fbe7c9383
commit 0bf04ebae8
1 changed files with 6 additions and 0 deletions

View File

@ -93,4 +93,10 @@ public class TableRow<ItemType, CellType: ConfigurableCell where CellType.T == I
actions[action.type.key] = action
return self
}
public func action<T>(type: TableRowActionType, handler: (data: TableRowActionData<ItemType, CellType>) -> T) -> Self {
actions[type.key] = TableRowAction(type, handler: handler)
return self
}
}