Closed SleeplessOne1917 closed 3 months ago
on_click_outside
returns a closure that you can call to stop the behavior. So to get rid of this warning you can simply do
let _ = on_click_outside(...)
Ah, my bad. Thank you for your prompt response.
It's not documented, so guess my bad 😂
Out of curiosity, what would one do with the closure returned from on_click_outside
anyway?
To "unlisten" everything
I'm using
on_click_outside
in my codebase and am getting this lint warning:Here is the relevant snippet of code it's complaining about:
Is this a problem with how I'm using the function, or is this an issue in the library?