Commit 8a331f9
committed
feat(widgets): add opt-in useRealOptionValues for native form submission
Add enumOptionValueEncoder/Decoder utilities to @rjsf/utils that allow rendering real enum values in option attributes instead of array indices. Controlled via ui:globalOptions or per-field ui:options.
When enabled, primitives use String(value) for DOM attributes with reverse lookup decoding. Objects/arrays fall back to index encoding. Default behavior (index-based) is fully preserved.
Applied across SelectWidget, RadioWidget, and CheckboxesWidget in all 10 theme packages.1 parent 557d562 commit 8a331f9
59 files changed
Lines changed: 1839 additions & 2825 deletions
File tree
- packages
- chakra-ui
- src
- CheckboxesWidget
- RadioWidget
- SelectWidget
- test/__snapshots__
- core
- src/components/widgets
- test
- __snapshots__
- daisyui
- src/widgets
- CheckboxesWidget
- RadioWidget
- SelectWidget
- test/__snapshots__
- fluentui-rc
- src
- CheckboxesWidget
- RadioWidget
- SelectWidget
- test/__snapshots__
- mantine
- src/widgets
- test/__snapshots__
- mui
- src
- CheckboxesWidget
- RadioWidget
- SelectWidget
- test/__snapshots__
- primereact/src
- RadioWidget
- SelectWidget
- react-bootstrap
- src
- CheckboxesWidget
- RadioWidget
- SelectWidget
- test/__snapshots__
- semantic-ui/src
- RadioWidget
- SelectWidget
- shadcn/src
- CheckboxesWidget
- RadioWidget
- SelectWidget
- utils
- src
- test
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 8 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
| 5 | + | |
4 | 6 | | |
5 | | - | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
37 | 38 | | |
38 | 39 | | |
39 | 40 | | |
| 41 | + | |
40 | 42 | | |
41 | 43 | | |
42 | | - | |
| 44 | + | |
43 | 45 | | |
44 | | - | |
| 46 | + | |
45 | 47 | | |
46 | 48 | | |
47 | 49 | | |
| |||
57 | 59 | | |
58 | 60 | | |
59 | 61 | | |
60 | | - | |
61 | | - | |
| 62 | + | |
| 63 | + | |
62 | 64 | | |
63 | 65 | | |
64 | 66 | | |
| |||
72 | 74 | | |
73 | 75 | | |
74 | 76 | | |
75 | | - | |
| 77 | + | |
76 | 78 | | |
77 | 79 | | |
78 | 80 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
5 | 7 | | |
6 | | - | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
| 36 | + | |
35 | 37 | | |
36 | 38 | | |
37 | | - | |
| 39 | + | |
38 | 40 | | |
39 | | - | |
| 41 | + | |
40 | 42 | | |
41 | | - | |
| 43 | + | |
42 | 44 | | |
43 | 45 | | |
44 | 46 | | |
| |||
58 | 60 | | |
59 | 61 | | |
60 | 62 | | |
61 | | - | |
| 63 | + | |
62 | 64 | | |
63 | 65 | | |
64 | 66 | | |
| |||
69 | 71 | | |
70 | 72 | | |
71 | 73 | | |
72 | | - | |
| 74 | + | |
73 | 75 | | |
74 | 76 | | |
75 | 77 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
| 7 | + | |
6 | 8 | | |
7 | | - | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
42 | 43 | | |
43 | 44 | | |
44 | 45 | | |
| 46 | + | |
45 | 47 | | |
46 | 48 | | |
47 | | - | |
| 49 | + | |
48 | 50 | | |
49 | 51 | | |
50 | 52 | | |
51 | | - | |
| 53 | + | |
52 | 54 | | |
53 | 55 | | |
54 | 56 | | |
55 | 57 | | |
56 | | - | |
| 58 | + | |
57 | 59 | | |
58 | 60 | | |
59 | | - | |
| 61 | + | |
60 | 62 | | |
61 | 63 | | |
62 | 64 | | |
| |||
71 | 73 | | |
72 | 74 | | |
73 | 75 | | |
74 | | - | |
| 76 | + | |
75 | 77 | | |
76 | 78 | | |
77 | 79 | | |
| |||
80 | 82 | | |
81 | 83 | | |
82 | 84 | | |
83 | | - | |
| 85 | + | |
84 | 86 | | |
85 | 87 | | |
86 | 88 | | |
| |||
103 | 105 | | |
104 | 106 | | |
105 | 107 | | |
106 | | - | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
107 | 121 | | |
108 | 122 | | |
109 | 123 | | |
| |||
Lines changed: 6 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1225 | 1225 | | |
1226 | 1226 | | |
1227 | 1227 | | |
1228 | | - | |
1229 | | - | |
| 1228 | + | |
1230 | 1229 | | |
1231 | 1230 | | |
1232 | 1231 | | |
| |||
2388 | 2387 | | |
2389 | 2388 | | |
2390 | 2389 | | |
2391 | | - | |
2392 | 2390 | | |
2393 | 2391 | | |
2394 | 2392 | | |
| |||
5032 | 5030 | | |
5033 | 5031 | | |
5034 | 5032 | | |
5035 | | - | |
5036 | | - | |
| 5033 | + | |
5037 | 5034 | | |
5038 | 5035 | | |
5039 | 5036 | | |
| |||
5706 | 5703 | | |
5707 | 5704 | | |
5708 | 5705 | | |
5709 | | - | |
5710 | 5706 | | |
5711 | 5707 | | |
5712 | 5708 | | |
| |||
10433 | 10429 | | |
10434 | 10430 | | |
10435 | 10431 | | |
10436 | | - | |
10437 | | - | |
| 10432 | + | |
10438 | 10433 | | |
10439 | 10434 | | |
10440 | 10435 | | |
| |||
12909 | 12904 | | |
12910 | 12905 | | |
12911 | 12906 | | |
12912 | | - | |
12913 | | - | |
| 12907 | + | |
12914 | 12908 | | |
12915 | 12909 | | |
12916 | 12910 | | |
| |||
15385 | 15379 | | |
15386 | 15380 | | |
15387 | 15381 | | |
15388 | | - | |
15389 | | - | |
| 15382 | + | |
15390 | 15383 | | |
15391 | 15384 | | |
15392 | 15385 | | |
| |||
17608 | 17601 | | |
17609 | 17602 | | |
17610 | 17603 | | |
17611 | | - | |
17612 | | - | |
| 17604 | + | |
17613 | 17605 | | |
17614 | 17606 | | |
17615 | 17607 | | |
| |||
0 commit comments