close sidebar when a linked resource is selected