FieldExternalDataSourceWrapper.vue 719 B

123456789101112131415161718192021
  1. <!-- Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/ -->
  2. <script setup lang="ts">
  3. import { toRef } from 'vue'
  4. import type { ExternalDataSourceProps as Props } from '#shared/components/Form/fields/FieldExternalDataSource/types.ts'
  5. import { useFieldExternalDataSourceWrapper } from '#shared/components/Form/fields/FieldExternalDataSource/useFieldExternalDataSourceWrapper.ts'
  6. import FieldAutoCompleteInput from '../FieldAutoComplete/FieldAutoCompleteInput.vue'
  7. const props = defineProps<Props>()
  8. Object.assign(
  9. props.context,
  10. useFieldExternalDataSourceWrapper(toRef(props, 'context')),
  11. )
  12. </script>
  13. <template>
  14. <FieldAutoCompleteInput :context="context" v-bind="$attrs" />
  15. </template>