7.6.2.52. ResourceYAMLEditor
A lazy loaded YAML editor for Kubernetes resources with hover help and completion. The component use the YAMLEditor and add on top of it more functionality like resource update handling, alerts, save, cancel and reload buttons, accessibility and more. Unless onSave callback is provided, the resource update is automatically handled. It should be wrapped in a React.Suspense component.
Example
<React.Suspense fallback={<LoadingBox />}>
<ResourceYAMLEditor
initialResource={resource}
header="Create resource"
onSave={(content) => updateResource(content)}
/>
</React.Suspense>
| Parameter Name | Description |
|---|---|
|
| YAML/Object representing a resource to be shown by the editor. This prop is used only during the initial render |
|
| Add a header on top of the YAML editor |
|
| Callback for the Save button. Passing it overrides the default update performed on the resource by the editor |