Question

Change the visibility of delete icon in the detail based on the result of call back function

Hello Community, 

 

I wanted to change the visibility of delete icon in the editable detail based on the result of callback function . 

 

I have tried calling the callback function in init and set the result to a variable 

and then called this.callParent(arguments); to trigger getDeleteRecordMenuItem() function. In getDeleteRecordMenuItem() based on the result in variable, the code is written to show/hide the delete button.

 

Now the result is intermittently working due to sync issues.

Any suggestions on how to achieve this is really helpful.

Like 0

Like

1 comments

Hello,

 

It's better to override the logic of the onActiveRowAction method and check if the buttonTag is "remove" and apply additional check and logic to it (for example display a popup message in case some conditions are not met).

 

Best regards,

Oscar

Show all comments