mirror of
https://github.com/coder/coder.git
synced 2026-11-08 22:12:43 +08:00
The current issue is that when multiple parameters are added or removed from a form because a user change in a conditional parameter value. The websocket parameters response gets out of sync with the state of the parameters in the form. The form state needs to be maintained because this is what gets submitted when the user attempts to create a workspace. Fixes: 1. When autofill params are set from the url, mark these params as touched in the form. This is necessary as only touched params are sent in the request to the websocket. These params should technically count as being touched because they were preset from the url params. 2. Create a hook to synchronize the parameters from the websocket response with the current state of the parameters stored in the form.