You can now setup an item which can, on menu inventory creation, fill all remaining slots
and optionally have a configurable action (such as ClickAction::close). This update also fixes a critical bug where you were unable to create menus without setting a valid array. Expect updates to the documentation in the next patch.