How to apply a "lock all" function to session_state?

You are executing the function here rather than passing it to the checkbox. The on_change argument expects a function object, i.e., lock_all. In your case, lock_all() just executes that function and returns None, which is then passed to the on_change argument.

2 Likes