Skip to content

Select only one parent at a time #6

@annathomasQB

Description

@annathomasQB

Hi,

First of all, great work with JKExpandTable! 👍

I've used it in my project - but i want to be able to select multiple child-Indexes of one parentCell only at a time. If i try to select child-Indexes belonging to different parentCells, it should show a warning message, and deselect the current selection.

Currently i'm able to show the warning message and do deselection of parentCell by making a call to the following method from the didSelectCellAtChildIndex:(NSInteger) childIndex withInParentCellIndex:(NSInteger) parentIndex method.

This is the call that I make : -

[self.expandTableView didSelectRowAtChildIndex:childIndex selected:NO underParentIndex:parentIndex];

But this deselects the parentCell only - the childCell remains selected, and on selecting it again, it then successfully removes the tick mark for the childIndex.

Please help me out - I would like both the child and parentCell to be deselected if i try selecting a child of a parentCell other than the already selected ParentCell. Any ideas?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions