yesamer commented on code in PR #2075:
URL: 
https://github.com/apache/incubator-kie-tools/pull/2075#discussion_r1423676874


##########
packages/boxed-expression-component/src/api/BeeTable.ts:
##########
@@ -77,7 +77,7 @@ export interface BeeTableProps<R extends object> {
   onRowDuplicated?: (args: { rowIndex: number }) => void;
   onRowReset?: (args: { rowIndex: number }) => void;
   onRowDeleted?: (args: { rowIndex: number }) => void;
-  onColumnAdded?: (args: { beforeIndex: number; groupType: string | undefined 
}) => void;
+  onColumnAdded?: (args: { beforeIndex: number; currentIndex?: number; 
groupType: string | undefined }) => void;

Review Comment:
   Yep, in some cases the logic is different in Scesim. Let me explain it. 
   - Case 1: the user wants to add a field on the left or the right of the 
selected column, grouped in the same instance group
   
   
https://github.com/apache/incubator-kie-tools/assets/16005046/4e5a99b9-bc52-44a2-b6c7-efae0ff0c376
   
   In this case, the change I made is not necessary, the internal BeeTable 
logic already covers this case.
   
   - Case 2: The user wants to add a new Instance in the table:
   
   
https://github.com/apache/incubator-kie-tools/assets/16005046/3bc2ff21-4c1b-4b8c-95e8-f52448e5013c
   
   This is the case where I need to override the Bee Default logic, and having 
the "target" index where to add the column is not enough. This is because I 
need to determine the correct "target" based on the different logic, that is to 
scan the select column's instance group (on the left or the right) and retrieve 
the first index "outside" the selected instance group.
   
   



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to