Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cell model closures should receive dataSource/delegate function params #102

Open
jessesquires opened this issue Jan 29, 2018 · 0 comments
Open
Milestone

Comments

@jessesquires
Copy link
Contributor

Most of the closures for cells at () -> Void
https://github.com/plangrid/ReactiveLists/blob/master/Sources/Typealiases.swift#L19-L32

Instead, the should receive the params from the method in which they are called, for example:
typealias DidSelectClosure = (tableView, indexPath) -> Void

It's not uncommon to need access to these values to perform certain operations.


Also of note:

Why not just define functions on the *CellViewModel` protocols? Seems like a much simpler design. No need for the typealiases.

@jessesquires jessesquires added this to the 0.2.0 milestone Feb 7, 2018
@jessesquires jessesquires self-assigned this Feb 7, 2018
@benasher44 benasher44 modified the milestones: 0.2.0, 0.3.0 Sep 11, 2018
@benasher44 benasher44 modified the milestones: 0.3.0, 0.4.0 Sep 20, 2018
@jessesquires jessesquires modified the milestones: 0.4.0, Next Jan 7, 2019
@jessesquires jessesquires removed their assignment Oct 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants