zurb / foundation-apps

The first front-end framework created for developing fully responsive web apps.
http://foundation.zurb.com/apps
MIT License
1.58k stars 216 forks source link

Toggle other Actionsheets / open only one Action at a time #723

Open HerrHase opened 8 years ago

HerrHase commented 8 years ago

I use multiple Actionsheets that are open and close with buttons. But i need only open one Actionsheet at a time. So i open one, i open a second, and the other has to close. But this didn't work. I search the code and added "foundationApi.closeActiveElements();" on line 95 in foundation-apps/js/angular/components/actionsheet/actionsheet.js

function toggle() {
      content.toggle();
      container.toggle();
      foundationApi.closeActiveElements();

      content.$apply();
      container.$apply();
}

And now if i open another Actionsheet, a already open Actionsheet closed. Maybe a option for the zf-action-sheet-tag