Skip to content

Proper handling of willSelectRowAt#30

Open
dmarcato wants to merge 1 commit intomalcommac:masterfrom
dmarcato:dm/fix_willselect
Open

Proper handling of willSelectRowAt#30
dmarcato wants to merge 1 commit intomalcommac:masterfrom
dmarcato:dm/fix_willselect

Conversation

@dmarcato
Copy link

Currently the library is not properly handling willSelectRowAt since there is noway to have it return nil (in case you want to prevent a row from being selected). The root of the issue is the Nil-coalescing operation in this line:

return (adapter.dispatchEvent(.willSelect, model: model, cell: nil, path: indexPath, params: nil) as? IndexPath) ?? indexPath

I thought about just removing it, but instead decided to use an approach similar to what you did with TableAdapterCellAction - thoughts?

P.S.: also made willDeselectRowAt consistent to willSelectRowAt, and changed the return type of didDeselect to Void (since it's not used anyway).

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

Successfully merging this pull request may close these issues.

1 participant