diff --git a/packages/bruno-app/src/components/RequestPane/QueryParams/StyledWrapper.js b/packages/bruno-app/src/components/RequestPane/QueryParams/StyledWrapper.js index b460c1b4f..5c3e1d537 100644 --- a/packages/bruno-app/src/components/RequestPane/QueryParams/StyledWrapper.js +++ b/packages/bruno-app/src/components/RequestPane/QueryParams/StyledWrapper.js @@ -22,12 +22,14 @@ const Wrapper = styled.div` } td { padding: 6px 10px; - } - } - td { - &:nth-child(1) { - padding: 0 0 0 8px; + &:nth-child(1) { + width: 30%; + } + + &:nth-child(3) { + width: 70px; + } } } diff --git a/packages/bruno-app/src/components/RequestPane/QueryParams/index.js b/packages/bruno-app/src/components/RequestPane/QueryParams/index.js index a1099f4fd..3d94dd3ca 100644 --- a/packages/bruno-app/src/components/RequestPane/QueryParams/index.js +++ b/packages/bruno-app/src/components/RequestPane/QueryParams/index.js @@ -7,17 +7,14 @@ import { useDispatch } from 'react-redux'; import { useTheme } from 'providers/Theme'; import { addQueryParam, - updateQueryParam, deleteQueryParam, - moveQueryParam, - updatePathParam + updatePathParam, + updateQueryParam } from 'providers/ReduxStore/slices/collections'; import SingleLineEditor from 'components/SingleLineEditor'; import { saveRequest, sendRequest } from 'providers/ReduxStore/slices/collections/actions'; import StyledWrapper from './StyledWrapper'; -import Table from 'components/Table/index'; -import ReorderTable from 'components/ReorderTable'; const QueryParams = ({ item, collection }) => { const dispatch = useDispatch(); @@ -103,75 +100,76 @@ const QueryParams = ({ item, collection }) => { ); }; - const handleParamDrag = ({ updateReorderedItem }) => { - dispatch( - moveQueryParam({ - collectionUid: collection.uid, - itemUid: item.uid, - updateReorderedItem - }) - ); - }; - return ( - +
-
Query
- - - +
Query
+
+ + + + + + + + {queryParams && queryParams.length - ? queryParams.map((param, index) => ( - - - - + - - )) + + + + + ); + }) : null} - -
NameValue
- handleQueryParamChange(e, param, 'name')} - /> - - handleQueryParamChange({ target: { value: newValue } }, param, 'value')} - onRun={handleRun} - collection={collection} - variablesAutocomplete={true} - /> - -
+ ? queryParams.map((param, index) => { + return ( +
handleQueryParamChange(e, param, 'enabled')} + type="text" + autoComplete="off" + autoCorrect="off" + autoCapitalize="off" + spellCheck="false" + value={param.name} + className="mousetrap" + onChange={(e) => handleQueryParamChange(e, param, 'name')} /> - - -
+ + handleQueryParamChange( + { + target: { + value: newValue + } + }, + param, + 'value' + ) + } + onRun={handleRun} + collection={collection} + item={item} + /> + +
+ handleQueryParamChange(e, param, 'enabled')} + /> + +
+
- + +