@@ -55,40 +55,46 @@ export const ModeledMethodDataGrid = ({
5555 return methodsWithModelability ;
5656 } , [ hideModeledApis , methods , modeledMethods , modifiedSignatures ] ) ;
5757
58+ const someMethodsAreVisible = methodsWithModelability . length > 0 ;
59+
5860 return (
5961 < VSCodeDataGrid gridTemplateColumns = { GRID_TEMPLATE_COLUMNS } >
60- < VSCodeDataGridRow rowType = "header" >
61- < VSCodeDataGridCell cellType = "columnheader" gridColumn = { 1 } >
62- API or method
63- </ VSCodeDataGridCell >
64- < VSCodeDataGridCell cellType = "columnheader" gridColumn = { 2 } >
65- Model type
66- </ VSCodeDataGridCell >
67- < VSCodeDataGridCell cellType = "columnheader" gridColumn = { 3 } >
68- Input
69- </ VSCodeDataGridCell >
70- < VSCodeDataGridCell cellType = "columnheader" gridColumn = { 4 } >
71- Output
72- </ VSCodeDataGridCell >
73- < VSCodeDataGridCell cellType = "columnheader" gridColumn = { 5 } >
74- Kind
75- </ VSCodeDataGridCell >
76- </ VSCodeDataGridRow >
77- { methodsWithModelability . map ( ( { method, methodCanBeModeled } ) => (
78- < MethodRow
79- key = { method . signature }
80- method = { method }
81- methodCanBeModeled = { methodCanBeModeled }
82- modeledMethod = { modeledMethods [ method . signature ] }
83- methodIsUnsaved = { modifiedSignatures . has ( method . signature ) }
84- modelingInProgress = { inProgressMethods . hasMethod (
85- packageName ,
86- method . signature ,
87- ) }
88- mode = { mode }
89- onChange = { onChange }
90- />
91- ) ) }
62+ { someMethodsAreVisible && (
63+ < >
64+ < VSCodeDataGridRow rowType = "header" >
65+ < VSCodeDataGridCell cellType = "columnheader" gridColumn = { 1 } >
66+ API or method
67+ </ VSCodeDataGridCell >
68+ < VSCodeDataGridCell cellType = "columnheader" gridColumn = { 2 } >
69+ Model type
70+ </ VSCodeDataGridCell >
71+ < VSCodeDataGridCell cellType = "columnheader" gridColumn = { 3 } >
72+ Input
73+ </ VSCodeDataGridCell >
74+ < VSCodeDataGridCell cellType = "columnheader" gridColumn = { 4 } >
75+ Output
76+ </ VSCodeDataGridCell >
77+ < VSCodeDataGridCell cellType = "columnheader" gridColumn = { 5 } >
78+ Kind
79+ </ VSCodeDataGridCell >
80+ </ VSCodeDataGridRow >
81+ { methodsWithModelability . map ( ( { method, methodCanBeModeled } ) => (
82+ < MethodRow
83+ key = { method . signature }
84+ method = { method }
85+ methodCanBeModeled = { methodCanBeModeled }
86+ modeledMethod = { modeledMethods [ method . signature ] }
87+ methodIsUnsaved = { modifiedSignatures . has ( method . signature ) }
88+ modelingInProgress = { inProgressMethods . hasMethod (
89+ packageName ,
90+ method . signature ,
91+ ) }
92+ mode = { mode }
93+ onChange = { onChange }
94+ />
95+ ) ) }
96+ </ >
97+ ) }
9298 </ VSCodeDataGrid >
9399 ) ;
94100} ;
0 commit comments