Skip to content

Commit

Permalink
fix(web): fix bodyparams height (#1101)
Browse files Browse the repository at this point in the history
  • Loading branch information
newfish-cmyk authored Apr 28, 2023
1 parent 17c72e3 commit 933da58
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion web/src/components/Editor/JSONEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ function JSONEditor(props: {
colorMode?: string;
onChange?: (value: string | undefined) => void;
}) {
const { value, onChange, height = "95%", colorMode = COLOR_MODE.light } = props;
const { value, onChange, height = "90%", colorMode = COLOR_MODE.light } = props;

const editorRef = useRef<monaco.editor.IStandaloneCodeEditor | null>();
const subscriptionRef = useRef<monaco.IDisposable | undefined>(undefined);
Expand Down
9 changes: 6 additions & 3 deletions web/src/pages/app/functions/mods/DebugPanel/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -202,15 +202,14 @@ export default function DebugPanel(props: { containerRef: any; showOverlay: bool
)}
</Tab>
)}

<Tab>
Headers
{headerParams.length > 0 && (
<span className="ml-1">({headerParams.length})</span>
)}
</Tab>
</TabList>
<TabPanels className="flex-grow overflow-auto">
<TabPanels className="relative flex-1 overflow-auto">
<TabPanel px={0} py={1}>
<QueryParamsTab
key={"QueryParamsTab"}
Expand All @@ -221,7 +220,11 @@ export default function DebugPanel(props: { containerRef: any; showOverlay: bool
</TabPanel>

{HAS_BODY_PARAMS_METHODS.includes(runningMethod) && (
<TabPanel px={0} py={1} style={{ height: "100%", overflow: "auto" }}>
<TabPanel
px={0}
py={1}
className="absolute bottom-0 left-0 right-0 top-0 overflow-auto"
>
<BodyParamsTab
onChange={(values) => {
setBodyParams(values);
Expand Down

0 comments on commit 933da58

Please sign in to comment.