Skip to content

Commit

Permalink
fix: preserve description while toggling field enabled status (hoppsc…
Browse files Browse the repository at this point in the history
…otch#4340)

Co-authored-by: jamesgeorge007 <[email protected]>
  • Loading branch information
jcgurango and jamesgeorge007 authored Sep 11, 2024
1 parent 7f18a84 commit cf2b1b5
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions packages/hoppscotch-common/src/components/http/KeyValue.vue
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@
key: name,
value: value,
active: isActive ? !entityActive : false,
description: description ?? '',
})
"
/>
Expand All @@ -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<{
Expand All @@ -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,
Expand Down

0 comments on commit cf2b1b5

Please sign in to comment.