From 233c57e6255560a1dafa32db04fd27562aacdcef Mon Sep 17 00:00:00 2001 From: therealrinku Date: Tue, 4 Mar 2025 12:00:39 +0545 Subject: [PATCH] feat: auto select body tab if it exists when params isnt active --- .../src/components/RequestPane/HttpRequestPane/index.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/packages/bruno-app/src/components/RequestPane/HttpRequestPane/index.js b/packages/bruno-app/src/components/RequestPane/HttpRequestPane/index.js index 09a665e9f..6cdf4a6d7 100644 --- a/packages/bruno-app/src/components/RequestPane/HttpRequestPane/index.js +++ b/packages/bruno-app/src/components/RequestPane/HttpRequestPane/index.js @@ -15,6 +15,7 @@ import Tests from 'components/RequestPane/Tests'; import StyledWrapper from './StyledWrapper'; import { find, get } from 'lodash'; import Documentation from 'components/Documentation/index'; +import { useEffect } from 'react'; const ContentIndicator = () => { return ( @@ -111,6 +112,12 @@ const HttpRequestPane = ({ item, collection, leftPaneWidth }) => { requestVars.filter((request) => request.enabled).length + responseVars.filter((response) => response.enabled).length; + useEffect(() => { + if (activeParamsLength === 0 && body.mode !== 'none') { + selectTab('body'); + } + }, []); + return (