The tray sits on the frame (that folds up) with magnets so if someone (or the vacuum) bumps into the legs hard enough it can fold. We haven’t had a disaster yet but have come close. I may end up using construction glue to fix it to the magnets permanently to avoid any accidents. 
The table looks exactly as pictured.