- Notifications
You must be signed in to change notification settings - Fork905
Commit290f11b
committed
fix: preserve parameter values when dynamic ordering changes
When parameters are reordered dynamically (e.g., when a parameter's orderdepends on another parameter's value), the parameter values were notdisplaying correctly. This was because the rendering logic used arrayindices instead of parameter names to map form values.The issue occurred when:1. Parameters are initially rendered in one order2. A parameter value changes, causing dynamic reordering3. The parameter array order changes but form values array stays the same4. Values get mismatched due to index-based lookupThis fix implements name-based lookup to ensure parameter values persistcorrectly regardless of ordering changes:- Find parameter value by name instead of array index- Use the found index for form field mapping- Fallback to current index for new parametersFixes parameter value persistence in dynamic parameter ordering scenarios.1 parent348d19d commit290f11b
File tree
1 file changed
+13
-3
lines changed- site/src/pages/CreateWorkspacePage
1 file changed
+13
-3
lines changedLines changed: 13 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
608 | 608 |
| |
609 | 609 |
| |
610 | 610 |
| |
611 |
| - | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
612 | 620 |
| |
613 | 621 |
| |
614 | 622 |
| |
| |||
629 | 637 |
| |
630 | 638 |
| |
631 | 639 |
| |
632 |
| - | |
633 |
| - | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
634 | 644 |
| |
635 | 645 |
| |
636 | 646 |
| |
|
0 commit comments
Comments
(0)