framework7io / framework7

Full featured HTML framework for building iOS & Android apps
http://framework7.io
MIT License
18.13k stars 3.23k forks source link

Feature request: Add closeByBackdropClick into compenent with openIn popup #4107

Closed Simone4e closed 1 year ago

Simone4e commented 1 year ago

Is your feature request related to a problem? Please describe. The problem is that each element may have a different preference as to whether or not to close via backdrop. For example in my case I have this need:

With this configuration it is not possible to use the options present now (configuration from the app / component configuration on the page)

The simplest solution is to add the ability to change the parameter for each component that uses it. Example:

$f7.photoBrowser.create({
  photos: [{
    url: 'photo1'
  }],  
  type: 'popup'
  popupOptions: {
    closeByBackdropClick: true
  }
}).open();

Or in app config

photoBrowser: {
        type: 'popup',
        popupOptions: {
           closeByBackdropClick: true
        }
}

This problem can be extended to any component that uses another component with options like this.

Simone4e commented 1 year ago

Thanks @nolimits4web ✌️