HubSpot/drop

Add option to override openOn using a function call exposing event attributes

shobhitsharma opened this issue · 1 comments

Currently, option openOn supports events like click, hover, etc. If we set it to null, then we manually have to call the open() and close() events. It would be nice if we override the openOn with function by exposing the event attributes so a developer can play around with utilities like hover timeout etc.

Structure could be:

{
  openOn: function (event) { console.log(event) return; }
}

That sounds like pretty cool idea, but I'm not entirely sure how that would work since we need the openOn fields to figure out which events to bind the open and close handlers to. The part that confuses me is how the openOn event would be called if there are no events bound to open the drop in the first place.

If you are looking to adjust the various open/close timeouts, #108 was merged a while back that enabled setting these various timeouts. Otherwise if you could provide a little more detail, I'd be happy to continue helping once I have a little more information.