From f6db530de26591769abcbc21a3dcb7df206bc86a Mon Sep 17 00:00:00 2001 From: Joel D Souza Date: Sat, 10 Apr 2021 13:33:37 +0530 Subject: [PATCH] Sync bodyParams and rawBodyParams (#1562) Co-authored-by: Liyas Thomas Co-authored-by: Joel DSouza --- components/http/BodyParameters.vue | 60 ++++++++++++++++++++++-------- pages/index.vue | 16 ++++++++ store/mutations.js | 4 ++ 3 files changed, 64 insertions(+), 16 deletions(-) diff --git a/components/http/BodyParameters.vue b/components/http/BodyParameters.vue index b1dca1e72..be9c38c85 100644 --- a/components/http/BodyParameters.vue +++ b/components/http/BodyParameters.vue @@ -27,12 +27,7 @@ :placeholder="`key ${index + 1}`" :name="`bparam ${index}`" :value="param.key" - @change=" - $store.commit('setKeyBodyParams', { - index, - value: $event.target.value, - }) - " + @change="updateBodyParams($event, index, `setKeyBodyParams`)" @keyup.prevent="setRouteQueryState" autofocus /> @@ -45,10 +40,7 @@ @change=" // if input is form data, set value to be an array containing the value // only - $store.commit('setValueBodyParams', { - index, - value: $event.target.value, - }) + updateBodyParams($event, index, `setValueBodyParams`) " @keyup.prevent="setRouteQueryState" /> @@ -68,12 +60,7 @@