title: Disable leaflet map using blockUI in checkboxes' layercontrol
body: <p>I'm developing a react app using leaflet and i've a problem with the layercontrol, specifically with the checkboxes functionality hiding/showing the layer. </p>
  
  <p>To contextualize, the app makes an AJAX request after each radiobutton select, to fill some layers in dependency of the option selected, and hide/show those layers using the checkboxes. I'm using the <a href="http://malsup.com/jquery/block/" rel="nofollow noreferrer">jQuery BlockUI plugin</a> to lock the map and prevent the user from manipulation the map. This plugin works fine with the AJAX calls (as i expected from the documentation), that is to say to each radiobutton, but when i tried to do the same in the leaflet methods
  the lock screen appears late, once the layer is already loaded. </p>
  
  <p>In my try to debug it, i noted that there is a bit of 'dead time' from the 'click' in the checkbox until the load of the layer with the painted polygons. I think that this is the key for the solution but i tried a lot of things to fix this and nothing works.</p>
  
  <p>My aim is to put the lock screen just before the click on the checkbox, while the layer is loading, until after the layer appears on the map. </p>
  
  <p>I made <a href="https://codesandbox.io/s/mmvn7vlqkp" rel="nofollow noreferrer">an functional example of the app in CodeSandbox</a> in case someone would help me. Any comments/ideas should be grateful, i've been in this a loooot of time.</p>