@@ -136,8 +136,8 @@ const ModelableMethodRow = forwardRef<HTMLElement | undefined, MethodRowProps>(
136136 } , [ focusedIndex ] ) ;
137137
138138 const modeledMethods = useMemo (
139- ( ) => modeledMethodsToDisplay ( modeledMethodsProp , method , viewState ) ,
140- [ modeledMethodsProp , method , viewState ] ,
139+ ( ) => modeledMethodsToDisplay ( modeledMethodsProp , method ) ,
140+ [ modeledMethodsProp , method ] ,
141141 ) ;
142142
143143 const validationErrors = useMemo (
@@ -219,13 +219,11 @@ const ModelableMethodRow = forwardRef<HTMLElement | undefined, MethodRowProps>(
219219 < DataGridCell >
220220 < InProgressDropdown />
221221 </ DataGridCell >
222- { viewState . showMultipleModels && (
223- < DataGridCell >
224- < CodiconRow appearance = "icon" disabled = { true } >
225- < Codicon name = "add" label = "Add new model" />
226- </ CodiconRow >
227- </ DataGridCell >
228- ) }
222+ < DataGridCell >
223+ < CodiconRow appearance = "icon" disabled = { true } >
224+ < Codicon name = "add" label = "Add new model" />
225+ </ CodiconRow >
226+ </ DataGridCell >
229227 </ >
230228 ) }
231229 { ! props . modelingInProgress && (
@@ -267,28 +265,26 @@ const ModelableMethodRow = forwardRef<HTMLElement | undefined, MethodRowProps>(
267265 onChange = { modeledMethodChangedHandlers [ index ] }
268266 />
269267 </ DataGridCell >
270- { viewState . showMultipleModels && (
271- < DataGridCell >
272- { index === 0 ? (
273- < CodiconRow
274- appearance = "icon"
275- aria-label = "Add new model"
276- onClick = { handleAddModelClick }
277- disabled = { addModelButtonDisabled }
278- >
279- < Codicon name = "add" />
280- </ CodiconRow >
281- ) : (
282- < CodiconRow
283- appearance = "icon"
284- aria-label = "Remove model"
285- onClick = { removeModelClickedHandlers [ index ] }
286- >
287- < Codicon name = "trash" />
288- </ CodiconRow >
289- ) }
290- </ DataGridCell >
291- ) }
268+ < DataGridCell >
269+ { index === 0 ? (
270+ < CodiconRow
271+ appearance = "icon"
272+ aria-label = "Add new model"
273+ onClick = { handleAddModelClick }
274+ disabled = { addModelButtonDisabled }
275+ >
276+ < Codicon name = "add" />
277+ </ CodiconRow >
278+ ) : (
279+ < CodiconRow
280+ appearance = "icon"
281+ aria-label = "Remove model"
282+ onClick = { removeModelClickedHandlers [ index ] }
283+ >
284+ < Codicon name = "trash" />
285+ </ CodiconRow >
286+ ) }
287+ </ DataGridCell >
292288 </ DataGridRow >
293289 ) ) }
294290 { validationErrors . map ( ( error , index ) => (
@@ -336,9 +332,7 @@ const UnmodelableMethodRow = forwardRef<
336332 < ViewLink onClick = { jumpToMethod } > View</ ViewLink >
337333 </ ApiOrMethodRow >
338334 </ DataGridCell >
339- < DataGridCell gridColumn = { `span ${ viewState . showMultipleModels ? 5 : 4 } ` } >
340- Method already modeled
341- </ DataGridCell >
335+ < DataGridCell gridColumn = "span 5" > Method already modeled</ DataGridCell >
342336 </ DataGridRow >
343337 ) ;
344338} ) ;
@@ -354,15 +348,10 @@ function sendJumpToMethodMessage(method: Method) {
354348function modeledMethodsToDisplay (
355349 modeledMethods : ModeledMethod [ ] ,
356350 method : Method ,
357- viewState : ModelEditorViewState ,
358351) : ModeledMethod [ ] {
359352 if ( modeledMethods . length === 0 ) {
360353 return [ createEmptyModeledMethod ( "none" , method ) ] ;
361354 }
362355
363- if ( viewState . showMultipleModels ) {
364- return modeledMethods ;
365- } else {
366- return modeledMethods . slice ( 0 , 1 ) ;
367- }
356+ return modeledMethods ;
368357}
0 commit comments