Add viewOptions parameter and fix onShow trigger

Added viewOptions parameter to extend the options passed to the subview.
Onshow now also triggers when modal opens for the first time.