DenniLa2
DenniLa2

Reputation: 381

ionic actionsheet cancelButton not shown on android

I looked at http://codepen.io/mhartington/pen/KwBpRq?editors=101 , and I have not seen cancelButton on android. On iOS everything works fine. How can I display cancelButton?

$ionicActionSheet.show({
  titleText: 'ActionSheet Example',
  buttons: [
    { text: '<i class="icon ion-share balanced"></i> Share' },
    { text: '<i class="icon ion-arrow-move assertive"></i> Move' },
  ],
  destructiveText: 'Delete', // <<
  cancelText: 'Cancel',
  cancel: function() {
    console.log('CANCELLED');
  },

Upvotes: 5

Views: 2478

Answers (1)

DenniLa2
DenniLa2

Reputation: 381

_action-sheet.scss has rule:

.platform-android .action-sheet-cancel {
    display: none;
}

To display cancelButton insert in .css/.scss file:

.platform-android .action-sheet-cancel {
    display: block !important;
}

Upvotes: 12

Related Questions