From df8f609104e3fe5889d8b0d536f585a19ed296a9 Mon Sep 17 00:00:00 2001 From: aednikanov Date: Thu, 27 Jun 2024 11:36:09 +0300 Subject: [PATCH] added label clear on cancel and back --- src/components/ParserOpenRPC/InteractiveBox/index.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/ParserOpenRPC/InteractiveBox/index.tsx b/src/components/ParserOpenRPC/InteractiveBox/index.tsx index a8ef3b2ed4..1edc93d09e 100644 --- a/src/components/ParserOpenRPC/InteractiveBox/index.tsx +++ b/src/components/ParserOpenRPC/InteractiveBox/index.tsx @@ -28,7 +28,7 @@ export default function InteractiveBox({ params, components, examples, onParamCh const [isComplexTypeView, setIsComplexTypeView] = useState(false); const formRef = useRef(null); const { colorMode } = useColorMode(); - const { setIsDrawerContentFixed } = useContext(ParserOpenRPCContext); + const { setIsDrawerContentFixed, setDrawerLabel } = useContext(ParserOpenRPCContext); const defaultExampleFormData = examples ? Object.fromEntries(examples[0].params.map(({ name, value }) => [name, value])) : {}; const schema: RJSFSchema = { @@ -85,6 +85,7 @@ export default function InteractiveBox({ params, components, examples, onParamCh const closeComplexTypeView = () => { setIsComplexTypeView(false); setIsDrawerContentFixed(false); + setDrawerLabel(null); } const handleCancelClick = () => {