Commit ad17ed8
fix(form): keep the fieldTabs schema keys off the DOM, and make tab position work
Two follow-ups found by running the tabbed form in a real browser (console
preview gallery):
- `fieldTabs` / `defaultFieldTab` / `fieldTabsPosition` bled through
`...formProps` onto the <form> element ("React does not recognize the
`fieldTabs` prop on a DOM element"), the same leak the neighbouring
destructure already guards `objectName` / `onDirtyChange` / `fields` against.
Added to that list, with a regression test that spreads the form node at the
top level the way the SDUI dispatch does.
- `fieldTabsPosition: 'bottom' | 'right'` positioned the strip with
`order-last`, which does nothing unless the parent is a flex container — the
root was only flex in the vertical case (a quirk carried over verbatim from
TabbedForm). The Tabs root is now always flex (`flex-col` when horizontal),
the strip keeps its content size via `self-start`, and `bottom` swaps its
margin to `mt-4`.
Re-verified in the browser: single form, panels force-mounted with the inactive
ones computed `display: none`, strip content-width above the panel, and no
console errors.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>1 parent 5af687e commit ad17ed8
2 files changed
Lines changed: 34 additions & 4 deletions
Lines changed: 21 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
141 | 162 | | |
142 | 163 | | |
143 | 164 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1151 | 1151 | | |
1152 | 1152 | | |
1153 | 1153 | | |
| 1154 | + | |
| 1155 | + | |
| 1156 | + | |
1154 | 1157 | | |
1155 | 1158 | | |
1156 | 1159 | | |
| |||
1195 | 1198 | | |
1196 | 1199 | | |
1197 | 1200 | | |
1198 | | - | |
| 1201 | + | |
| 1202 | + | |
| 1203 | + | |
| 1204 | + | |
1199 | 1205 | | |
1200 | 1206 | | |
1201 | 1207 | | |
1202 | | - | |
1203 | | - | |
1204 | | - | |
| 1208 | + | |
| 1209 | + | |
| 1210 | + | |
| 1211 | + | |
| 1212 | + | |
| 1213 | + | |
1205 | 1214 | | |
1206 | 1215 | | |
1207 | 1216 | | |
| |||
0 commit comments