IKHSAN
ENID Baca dalam Bahasa Indonesia

opendesk

Public
Branch
main
Latest commit
08d9f3328 October 2026

FieldDependencyFieldsSelection.vue

Open raw
<template>
  <div class="flex gap-3 w-full justify-between flex-1">
    <div class="flex-1 flex flex-col gap-1.5">
      <span class="block text-xs text-ink-gray-5"
        >{{ __("Parent field") }}
        <span class="text-ink-red-6 select-none">*</span>
      </span>
      <Combobox
        v-model="state.selectedParentField"
        :options="parentFields"
        :disabled="!isNew"
        :open-on-focus="true"
        class="w-full"
      />
    </div>
    <div class="flex-1 flex flex-col gap-1.5">
      <span class="block text-xs text-ink-gray-5"
        >{{ __("Child field") }}
        <span class="text-ink-red-6 select-none">*</span>
      </span>
      <Combobox
        v-model="state.selectedChildField"
        :options="state.childFields"
        :disabled="!state.selectedParentField || !isNew"
        :open-on-focus="true"
        class="w-full"
      />
    </div>
  </div>
</template>

<script setup lang="ts">
import { FieldCriteriaState } from "@/types";
import { Combobox } from "frappe-ui";

const state = defineModel<FieldCriteriaState>();

const props = defineProps<{
  isNew: boolean;
  parentFields: any[];
}>();
</script>

<style scoped></style>
bytes
1,182
lines
45
Type
vue
Latest commit
28 October 2026