Skip to content

Ion-checkbox in an ion-list prevents ion-option-button from showing ionic #2714

@oaksagelew

Description

@oaksagelew

I created an ion-list in which each ion-item has an ion-checkbox. The ion-list has an option for an ion-delete button and an ion-option button. In the list, the ion-delete button shows up fine, but with an ion-checkbox present, I can no longer swipe left to reveal the ion-option button. Here's my markup:

<div>
   <ion-content has-header="true">
        <form method="post" ng-submit="inviteContacts()" name="inviteForm">
            <ion-list show-delete="appearance.showDeleteIcon" type="card">
                <ion-item class="rs-item item-icon-right" ng-repeat="contact in contacts">
                    <div style="display:inline">
                        <ion-checkbox ng-model="contact.checked" ng-checked="contact.checked">
                        <img ng-src={{contact.avatar}}>
                        <p>{{contact.displayName}}</p>
                    </ion-checkbox>
                </div>
                <ion-option-button class="button-assertive" ng-click="edit(item)"> Edit </ion-option-button>
                <ion-delete-button class="ion-close-round" ng-click="onItemDelete(item)"></ion-delete-button>
            </ion-item>
        </ion-list>
    </form>
</div>
</ion-content>
<div class="bar-royal ng-enter bar bar-footer">
     <div class="button-bar">
        <button ng-click="flipDelete()" class="button button-icon icon ion-close-round">&nbsp;&nbsp;&nbsp;Remove</button>
        <button ng-click="checkAll()" ng-model="selectAll" class="button button-icon icon ion-checkmark-circled">&nbsp;&nbsp;&nbsp;{{words.buttontext}}</button>
        <button ng-click="submitExternal()" class="button button-royal">Invite Contacts</button>
    </div>
 </div>
</div>  

This is consistent and easy to check: simply comment out the <ion-checkbox> tag and the list item becomes left-swipeable, revealing the option button. Reinstate the <ion-checkbox> and you can no longer left-swipe.

Any ideas as to what might be going on? A problem in my markup? An Ionic issue? Something else? I'd like to have that option button available if at all possible. And it's a handy feature in any case: having a list item with a checkbox shouldn't preclude it also featuring option buttons; if you can have a delete button, you should also be able to have an option button. (Unless it's a bug in my markup.)

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions