Open-Source API Development Ecosystem • https://hoppscotch.io • Offline, On-Prem & Cloud • Web, Desktop & CLI • Open-Source Alternative to Postman, Insomnia
TypeScript apiapi-clientapi-restapi-testingdeveloper-toolsgraphqlhttphttp-clientpwarestrest-apispatestingtesting-toolstoolsvuevuejswebsocket
fix: preserve description while toggling field enabled status (#4340)
jcgurangocf2b1b50fae3
diff --git a/packages/hoppscotch-common/src/components/http/KeyValue.vue b/packages/hoppscotch-common/src/components/http/KeyValue.vueindex 8e4137dfe..da2f2364c 100644--- a/packages/hoppscotch-common/src/components/http/KeyValue.vue+++ b/packages/hoppscotch-common/src/components/http/KeyValue.vue@@ -94,6 +94,7 @@key: name,value: value,active: isActive ? !entityActive : false,+ description: description ?? '',})"/>@@ -119,6 +120,14 @@ import { useI18n } from "~/composables/i18n"import { AggregateEnvironment } from "~/newstore/environments"import { InspectorResult } from "~/services/inspection"+type Entity = {+ id: number+ key: string+ value: string+ active: boolean+ description: string+}+const t = useI18n()defineProps<{@@ -141,10 +150,13 @@ const emit = defineEmits<{(e: "update:value", value: string): void(e: "update:description", value: string): void(e: "deleteEntity", value: number): void- (e: "updateEntity", { index, payload }: { index: number; payload: any }): void+ (+ e: "updateEntity",+ { index, payload }: { index: number; payload: Entity }+ ): void}>()-const updateEntity = (index: number, payload: any) => {+const updateEntity = (index: number, payload: Entity) => {emit("updateEntity", {index,payload,