- Notifications
You must be signed in to change notification settings - Fork925
Commit25f1b76
authored
fix: handle empty strings for Select component (#18553)
resolve#18361Its possible for a dynamic parameter option value to be an empty stringwhich will cause the following error in the Radix Select component. Thesolution is to handle empty strings so that they are not set directly inthe component.`Uncaught Error: A <Select.Item /> must have a value prop that is not anempty string. This is because the Select value can be set to an emptystring to clear the selection and show the placeholder.````data "coder_parameter" "radio" { name = "radio" display_name = "An example of a radio input" description = "The next parameter supports a single value." type = "string" form_type = "dropdown" order = 1 default = "" option { name = "Empty" value = "" }}```1 parent6ed2204 commit25f1b76
File tree
1 file changed
+26
-8
lines changed- site/src/modules/workspaces/DynamicParameter
1 file changed
+26
-8
lines changedLines changed: 26 additions & 8 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
379 | 379 |
| |
380 | 380 |
| |
381 | 381 |
| |
382 |
| - | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
383 | 389 |
| |
384 | 390 |
| |
385 |
| - | |
386 |
| - | |
| 391 | + | |
| 392 | + | |
387 | 393 |
| |
388 | 394 |
| |
389 | 395 |
| |
| |||
393 | 399 |
| |
394 | 400 |
| |
395 | 401 |
| |
396 |
| - | |
397 |
| - | |
398 |
| - | |
399 |
| - | |
400 |
| - | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
401 | 418 |
| |
402 | 419 |
| |
403 | 420 |
| |
| 421 | + | |
404 | 422 |
| |
405 | 423 |
| |
406 | 424 |
| |
|
0 commit comments
Comments
(0)