Skip to content

Conversation

@lukebakken
Copy link
Collaborator

Fixes #15015

When creating a queue in the management UI, selecting a non-/ virtual host, then a queue type different than the default for that virtual host causes the vhost selection to reset to /. This happens because changing the queue type calls update(), which re-renders the entire form to display specific data for that virtual host, losing the user's virtual host selection.

This change reorders the "Add a new queue" form fields so that "Type" appears before "Virtual host". Users now select the queue type first, triggering the form re-render before they make their vhost selection. This prevents the vhost reset without requiring JS wizardry/hacks to preserve form state across re-renders.

When creating a queue in the management UI, selecting a non-`/` virtual
host, then a queue type different than the default for that virtual host
causes the vhost selection to reset to `/`. This happens because
changing the queue type calls `update()`, which re-renders the entire
form to display specific data for that virtual host, losing the user's
virtual host selection.

This change reorders the "Add a new queue" form fields so that "Type"
appears before "Virtual host". Users now select the queue type first,
triggering the form re-render before they make their vhost selection.
This prevents the vhost reset without requiring JS wizardry/hacks to
preserve form state across re-renders.
@michaelklishin michaelklishin merged commit eb971c3 into rabbitmq:main Nov 26, 2025
574 of 576 checks passed
@michaelklishin
Copy link
Collaborator

Admittedly we cannot immediately say if this will have the desired effect (that the queue type will be selected first) but this is effectively a "zero code" backwards compatible change, so why not try it.

@michaelklishin
Copy link
Collaborator

Thank you, @lukebakken!

@michaelklishin michaelklishin changed the title Reorder queue creation form to prevent vhost reset Reorder queue creation form to make vhost dropdown reset less likely Nov 26, 2025
michaelklishin added a commit that referenced this pull request Nov 26, 2025
Reorder queue creation form to make vhost dropdown reset less likely (backport #15016)
@the-mikedavis the-mikedavis deleted the rabbitmq-server-15015 branch November 26, 2025 00:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Management UI: changing queue type resets most of the declaration form (namely the virtual host selected)

2 participants