visma-meglerfront / sweet-modal-vue

The sweetest library to happen to modals.
Other
755 stars 85 forks source link

Can open tabbed modal to specific tab. #31

Closed ghost closed 7 years ago

ghost commented 7 years ago

I needed the ability to open different tabs as the initial tab depending on a passed in parameter. Use case: I have a settings modal shared across many screens, tabbed into categories / screen specific settings, and opening the settings modal from one specific screen should open the modal in the corresponding tab for the screen you opened the modal from.

In addition to letting the id of the tab being passed in, the open function also tries the passed in value as the tab index instead - this isn't really needed, but it was an easy addition.

bluefirex commented 7 years ago

Looks good! 👍 Can you update the documentation, too?

ghost commented 7 years ago

Not sure where I would squeeze in info on the feature, but I've at least updated the doc for the open function now, don't know which of the two you meant for me to update.

bluefirex commented 7 years ago

All good! Thanks