Skip to content

Commit

Permalink
added label clear on cancel and back
Browse files Browse the repository at this point in the history
  • Loading branch information
aednikanov committed Jun 27, 2024
1 parent 10fe4de commit df8f609
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/ParserOpenRPC/InteractiveBox/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down Expand Up @@ -85,6 +85,7 @@ export default function InteractiveBox({ params, components, examples, onParamCh
const closeComplexTypeView = () => {
setIsComplexTypeView(false);
setIsDrawerContentFixed(false);
setDrawerLabel(null);
}

const handleCancelClick = () => {
Expand Down

0 comments on commit df8f609

Please sign in to comment.