mcgilman commented on code in PR #8653:
URL: https://github.com/apache/nifi/pull/8653#discussion_r1569023212


##########
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/ui/common/extension-creation/extension-creation.component.ts:
##########
@@ -198,7 +201,8 @@ export class ExtensionCreation {
         if (this.selectedType && this.dataSource.filteredData.length > 0) {
             // find the index of the currently selected row
             const selectedIndex = this.dataSource.filteredData.findIndex(
-                (data) => data.type === this.selectedType?.type
+                (data) =>
+                    data.type === this.selectedType?.type && 
data.bundle.version === this.selectedType?.bundle.version

Review Comment:
   The optional chaining on `selectedType` is unnecessary since it's checked in 
the condition above. Additionally, I think we need to also consider the bundle 
`artifact` and `group`. If we encounter an extension with the same `type` and 
`version` but differing in one of the other bundle coordinates we'd still have 
an issue here. We should also consider centralizing this `equals` logic since 
it's needed here and in `isSelected` above.  



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to