Describe the bug
When creating a queue via the RabbitMQ management UI, changing the queue Type unexpectedly resets the Virtual Host to "/".
Since the Type input is below the Virtual Host input, this is not intuitive and often leads to queues being created on the wrong vhost.
Reproduction steps
- Open the RabbitMQ Management UI.
- Go to the "Admin" tab, in the "Virtual Hosts" sub-tab, add a new virtual host (e.g., "myhost").
- Go to "Queues and Streams" tab.
- Expand the "Add a new queue" section.
- For
Virtual Host input, select the newly created virtual host.
- For
Type input, select any other type.
Virtual Host is suddenly reset to "/".

Expected behavior
Virtual Host input should retain selection (i.e., "myvhost") regardless of Type.
Additional context
RabbitMQ version 4.2.1