diff --git a/packages/bruno-app/src/components/RequestPane/MultipartFormParams/index.js b/packages/bruno-app/src/components/RequestPane/MultipartFormParams/index.js index d4bb1d4fb..f54459169 100644 --- a/packages/bruno-app/src/components/RequestPane/MultipartFormParams/index.js +++ b/packages/bruno-app/src/components/RequestPane/MultipartFormParams/index.js @@ -4,6 +4,8 @@ import cloneDeep from 'lodash/cloneDeep'; import { IconTrash } from '@tabler/icons'; import { useDispatch } from 'react-redux'; import { addMultipartFormParam, updateMultipartFormParam, deleteMultipartFormParam } from 'providers/ReduxStore/slices/collections'; +import SingleLineEditor from 'components/SingleLineEditor'; +import { sendRequest } from 'providers/ReduxStore/slices/collections/actions'; import StyledWrapper from './StyledWrapper'; const MultipartFormParams = ({ item, collection }) => { @@ -19,6 +21,7 @@ const MultipartFormParams = ({ item, collection }) => { ); }; + const handleRun = () => dispatch(sendRequest(item, collection.uid)); const handleParamChange = (e, _param, type) => { const param = cloneDeep(_param); switch (type) { @@ -82,15 +85,15 @@ const MultipartFormParams = ({ item, collection }) => { /> - handleParamChange(e, param, 'value')} + handleParamChange({ + target: { + value: newValue + } + }, param, 'value')} + onRun={handleRun} + collection={collection} /> diff --git a/packages/bruno-app/src/components/RequestPane/QueryParams/index.js b/packages/bruno-app/src/components/RequestPane/QueryParams/index.js index 84d3bc28d..7fd363971 100644 --- a/packages/bruno-app/src/components/RequestPane/QueryParams/index.js +++ b/packages/bruno-app/src/components/RequestPane/QueryParams/index.js @@ -4,6 +4,8 @@ import cloneDeep from 'lodash/cloneDeep'; import { IconTrash } from '@tabler/icons'; import { useDispatch } from 'react-redux'; import { addQueryParam, updateQueryParam, deleteQueryParam } from 'providers/ReduxStore/slices/collections'; +import SingleLineEditor from 'components/SingleLineEditor'; +import { sendRequest } from 'providers/ReduxStore/slices/collections/actions'; import StyledWrapper from './StyledWrapper'; @@ -20,6 +22,7 @@ const QueryParams = ({ item, collection }) => { ); }; + const handleRun = () => dispatch(sendRequest(item, collection.uid)); const handleParamChange = (e, _param, type) => { const param = cloneDeep(_param); @@ -85,15 +88,15 @@ const QueryParams = ({ item, collection }) => { /> - handleParamChange(e, param, 'value')} + handleParamChange({ + target: { + value: newValue + } + }, param, 'value')} + onRun={handleRun} + collection={collection} />