FieldExternalDataSourceWrapper.vue 822 B

1234567891011121314151617181920212223242526
  1. <!-- Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/ -->
  2. <script setup lang="ts">
  3. import { defineAsyncComponent, 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. const FieldAutoCompleteInput = defineAsyncComponent(
  7. () =>
  8. import(
  9. '#mobile/components/Form/fields/FieldAutoComplete/FieldAutoCompleteInput.vue'
  10. ),
  11. )
  12. const props = defineProps<Props>()
  13. Object.assign(
  14. props.context,
  15. useFieldExternalDataSourceWrapper(toRef(props, 'context')),
  16. )
  17. </script>
  18. <template>
  19. <FieldAutoCompleteInput :context="context" v-bind="$attrs" />
  20. </template>