From 3005c94010c8f3dbe610202303b2c0b1dcdd960b Mon Sep 17 00:00:00 2001 From: ewandor Date: Mon, 21 Apr 2025 15:37:18 +0200 Subject: [PATCH] Standarzing the TextWidget widget --- .../src/lib/crud/components/widgets/crud-text-widget.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gui/rpk-gui/src/lib/crud/components/widgets/crud-text-widget.tsx b/gui/rpk-gui/src/lib/crud/components/widgets/crud-text-widget.tsx index bc9e85d..fe085f9 100644 --- a/gui/rpk-gui/src/lib/crud/components/widgets/crud-text-widget.tsx +++ b/gui/rpk-gui/src/lib/crud/components/widgets/crud-text-widget.tsx @@ -1,4 +1,5 @@ import React from "react"; +import { getDefaultRegistry } from "@rjsf/core"; import { FormContextType, getTemplate, RJSFSchema, WidgetProps } from "@rjsf/utils"; import Typography from "@mui/material/Typography"; @@ -11,15 +12,14 @@ export default function CrudTextWidget ) { const { schema } = props; - if (schema.hasOwnProperty("foreign_key")) { + if (schema.hasOwnProperty("foreignKey")) { return ; } else if (schema.hasOwnProperty("const")) { return {schema.const as string}; } else if (schema.props?.hasOwnProperty("richtext")) { return ; } else { - const { options, registry } = props; - const BaseInputTemplate = getTemplate<'BaseInputTemplate', T, S, F>('BaseInputTemplate', registry, options); - return ; + const { widgets: { TextWidget } } = getDefaultRegistry(); + return ; } }