Sidebar not collapsing on Mobile view [in Material Design theme]

Hi, in the material design theme, the sidebar does not automatically collapse when I click on a nav link.

I have made a test. The sidebar does automatically close if the nav link isn’t bound to any ‘click’ function, and it stops automatically collapsing when I bind it to any ‘click’ event-handler. Here is a simple app to demonstrate it.

Clone link:
https://anvil.works/build#clone:PJTENYVI5UJW32NE=QXGJ4GWEI7WXO57ZITH6WNKZ

I’m not sure if this is the root cause, or am I missing something obvious here?

That clone link seems to be broken

Thanks for the reply, I have fixed the clone link