@@ -24,7 +24,7 @@ import { SarifLocation } from "./locations/SarifLocation";
2424import { AlertTableDropdownIndicatorCell } from "./AlertTableDropdownIndicatorCell" ;
2525import { AlertTableNoResults } from "./AlertTableNoResults" ;
2626import { AlertTableTruncatedMessage } from "./AlertTableTruncatedMessage" ;
27- import { AlertTablePathNodeRow } from "./AlertTablePathNodeRow " ;
27+ import { AlertTablePathRow } from "./AlertTablePathRow " ;
2828
2929type AlertTableProps = ResultTableProps & {
3030 resultSet : InterpretedResultSet < SarifInterpretationData > ;
@@ -178,61 +178,23 @@ export class AlertTable extends React.Component<
178178
179179 const pathRows =
180180 currentResultExpanded &&
181- paths . map ( ( path , pathIndex ) => {
182- const pathKey = { resultIndex, pathIndex } ;
183- const currentPathExpanded = this . state . expanded . has (
184- Keys . keyToString ( pathKey ) ,
185- ) ;
186- const isPathSpecificallySelected = Keys . equalsNotUndefined (
187- pathKey ,
188- selectedItem ,
189- ) ;
190- const pathRow = (
191- < tr
192- ref = { this . scroller . ref ( isPathSpecificallySelected ) }
193- { ...selectableZebraStripe (
194- isPathSpecificallySelected ,
195- resultIndex ,
196- ) }
197- key = { `${ resultIndex } -${ pathIndex } ` }
198- >
199- < td className = "vscode-codeql__icon-cell" >
200- < span className = "vscode-codeql__vertical-rule" > </ span >
201- </ td >
202- < AlertTableDropdownIndicatorCell
203- expanded = { currentPathExpanded }
204- onClick = { toggler ( [ pathKey ] ) }
205- />
206- < td className = "vscode-codeql__text-center" colSpan = { 3 } >
207- Path
208- </ td >
209- </ tr >
210- ) ;
211-
212- const pathNodeRows =
213- currentPathExpanded &&
214- path . locations . map ( ( step , pathNodeIndex ) => (
215- < AlertTablePathNodeRow
216- key = { `${ resultIndex } -${ pathIndex } -${ pathNodeIndex } ` }
217- step = { step }
218- pathNodeIndex = { pathNodeIndex }
219- pathIndex = { pathIndex }
220- resultIndex = { resultIndex }
221- selectedItem = { selectedItem }
222- databaseUri = { databaseUri }
223- sourceLocationPrefix = { sourceLocationPrefix }
224- updateSelectionCallback = { updateSelectionCallback }
225- scroller = { this . scroller }
226- />
227- ) ) ;
228-
229- return (
230- < >
231- { pathRow }
232- { pathNodeRows }
233- </ >
234- ) ;
235- } ) ;
181+ paths . map ( ( path , pathIndex ) => (
182+ < AlertTablePathRow
183+ key = { `${ resultIndex } -${ pathIndex } ` }
184+ path = { path }
185+ pathIndex = { pathIndex }
186+ resultIndex = { resultIndex }
187+ currentPathExpanded = { this . state . expanded . has (
188+ Keys . keyToString ( { resultIndex, pathIndex } ) ,
189+ ) }
190+ selectedItem = { selectedItem }
191+ databaseUri = { databaseUri }
192+ sourceLocationPrefix = { sourceLocationPrefix }
193+ updateSelectionCallback = { updateSelectionCallback }
194+ toggler = { toggler }
195+ scroller = { this . scroller }
196+ />
197+ ) ) ;
236198
237199 return (
238200 < >
0 commit comments