Use JSON patch for editing components (#3674)

This commit is contained in:
Sebastian Malton authored and GitHub committed 2021-10-04 16:28:19 -04:00
1 parent 8b1de233f2
commit 4705a66632
18 files changed
+242 -106

No files matched your search

@@ -44,15 +44,11 @@ export class KubeObjectMenu<T extends KubeObject> extends React.Component<KubeOb
}
get isEditable() {
const { editable } = this.props;
return editable !== undefined ? editable : !!(this.store && this.store.update);
return this.props.editable ?? Boolean(this.store?.patch);
}
get isRemovable() {
const { removable } = this.props;
return removable !== undefined ? removable : !!(this.store && this.store.remove);
return this.props.removable ?? Boolean(this.store?.remove);
}
@boundMethod