Revert breaking change in Extension API

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>
This commit is contained in:
Janne SavolainenandMikko Aspiala committed 2021-12-04 12:22:53 +02:00
1 parent 159e093902
commit 79f53845ce
1 file changed
+3 -3
@@ -79,7 +79,7 @@ export class KubeObjectMenu<
}
@boundMethod
getRemoveMessage() {
renderRemoveMessage() {
const { object } = this.props;
if (!object) {
@@ -110,7 +110,7 @@ export class KubeObjectMenu<
}
render() {
const { remove, update, getRemoveMessage, isEditable, isRemovable } = this;
const { remove, update, renderRemoveMessage, isEditable, isRemovable } = this;
const { className, editable, removable, ...menuProps } = this.props;
return (
@@ -118,7 +118,7 @@ export class KubeObjectMenu<
className={cssNames("KubeObjectMenu", className)}
updateAction={isEditable ? update : undefined}
removeAction={isRemovable ? remove : undefined}
removeConfirmationMessage={getRemoveMessage}
removeConfirmationMessage={renderRemoveMessage}
{...menuProps}
>
{this.getMenuItems()}