@@ -25,12 +25,6 @@ import { Codicon } from "../common";
2525import { canAddNewModeledMethod } from "../../model-editor/shared/multiple-modeled-methods" ;
2626import { DataGridCell , DataGridRow } from "../common/DataGrid" ;
2727
28- const MultiModelColumn = styled ( DataGridCell ) `
29- display: flex;
30- flex-direction: column;
31- gap: 0.5em;
32- ` ;
33-
3428const ApiOrMethodRow = styled . div `
3529 min-height: calc(var(--input-height) * 1px);
3630 display: flex;
@@ -162,7 +156,7 @@ const ModelableMethodRow = forwardRef<HTMLElement | undefined, MethodRowProps>(
162156 ref = { ref }
163157 focused = { revealedMethodSignature === method . signature }
164158 >
165- < DataGridCell >
159+ < DataGridCell gridRow = { `span ${ modeledMethods . length } ` } >
166160 < ApiOrMethodRow >
167161 < ModelingStatusIndicator status = { modelingStatus } />
168162 < MethodClassifications method = { method } />
@@ -199,54 +193,41 @@ const ModelableMethodRow = forwardRef<HTMLElement | undefined, MethodRowProps>(
199193 ) }
200194 </ >
201195 ) }
202- { ! props . modelingInProgress && (
203- < >
204- < MultiModelColumn >
205- { modeledMethods . map ( ( modeledMethod , index ) => (
196+ { ! props . modelingInProgress &&
197+ modeledMethods . map ( ( modeledMethod , index ) => (
198+ < >
199+ < DataGridCell >
206200 < ModelTypeDropdown
207- key = { index }
208201 method = { method }
209202 modeledMethod = { modeledMethod }
210203 onChange = { modeledMethodChangedHandlers [ index ] }
211204 />
212- ) ) }
213- </ MultiModelColumn >
214- < MultiModelColumn >
215- { modeledMethods . map ( ( modeledMethod , index ) => (
205+ </ DataGridCell >
206+ < DataGridCell >
216207 < ModelInputDropdown
217- key = { index }
218208 method = { method }
219209 modeledMethod = { modeledMethod }
220210 onChange = { modeledMethodChangedHandlers [ index ] }
221211 />
222- ) ) }
223- </ MultiModelColumn >
224- < MultiModelColumn >
225- { modeledMethods . map ( ( modeledMethod , index ) => (
212+ </ DataGridCell >
213+ < DataGridCell >
226214 < ModelOutputDropdown
227- key = { index }
228215 method = { method }
229216 modeledMethod = { modeledMethod }
230217 onChange = { modeledMethodChangedHandlers [ index ] }
231218 />
232- ) ) }
233- </ MultiModelColumn >
234- < MultiModelColumn >
235- { modeledMethods . map ( ( modeledMethod , index ) => (
219+ </ DataGridCell >
220+ < DataGridCell >
236221 < ModelKindDropdown
237- key = { index }
238222 method = { method }
239223 modeledMethod = { modeledMethod }
240224 onChange = { modeledMethodChangedHandlers [ index ] }
241225 />
242- ) ) }
243- </ MultiModelColumn >
244- { viewState . showMultipleModels && (
245- < MultiModelColumn >
246- { modeledMethods . map ( ( _ , index ) =>
247- index === modeledMethods . length - 1 ? (
226+ </ DataGridCell >
227+ { viewState . showMultipleModels && (
228+ < DataGridCell >
229+ { index === modeledMethods . length - 1 ? (
248230 < CodiconRow
249- key = { index }
250231 appearance = "icon"
251232 aria-label = "Add new model"
252233 onClick = { handleAddModelClick }
@@ -256,19 +237,17 @@ const ModelableMethodRow = forwardRef<HTMLElement | undefined, MethodRowProps>(
256237 </ CodiconRow >
257238 ) : (
258239 < CodiconRow
259- key = { index }
260240 appearance = "icon"
261241 aria-label = "Remove model"
262242 onClick = { removeModelClickedHandlers [ index ] }
263243 >
264244 < Codicon name = "trash" />
265245 </ CodiconRow >
266- ) ,
267- ) }
268- </ MultiModelColumn >
269- ) }
270- </ >
271- ) }
246+ ) }
247+ </ DataGridCell >
248+ ) }
249+ </ >
250+ ) ) }
272251 </ DataGridRow >
273252 ) ;
274253 } ,
0 commit comments