Commit 0d158f0
committed
bug #7575 Apply DefaultColumns to ChoiceField regardless of widget type (lacatoire)
This PR was submitted for the 5.x branch but it was squashed and merged into the 4.x branch instead.
Discussion
----------
Apply DefaultColumns to ChoiceField regardless of widget type
When a ChoiceField uses the native `<select>` widget (via `renderAsNativeWidget(true)`), the default columns were never set because the call to `setDefaultColumns()` was nested inside the autocomplete branch, leaving the field with an overly wide layout.
Moving the default columns assignment outside that conditional restores the expected column sizing for all widget types, while preserving the existing values for the autocomplete widget.
Fixes #7550
Commits
-------
7d4642f Apply DefaultColumns to ChoiceField regardless of widget type2 files changed
Lines changed: 39 additions & 3 deletions
File tree
- src/Field/Configurator
- tests/Unit/Field/Configurator
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
97 | | - | |
98 | | - | |
99 | | - | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
100 | 101 | | |
101 | 102 | | |
102 | 103 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
116 | 151 | | |
0 commit comments