Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Got @undefined in Vue3 #96

Open
claide opened this issue Aug 9, 2023 · 0 comments
Open

Got @undefined in Vue3 #96

claide opened this issue Aug 9, 2023 · 0 comments

Comments

@claide
Copy link

claide commented Aug 9, 2023

Hi, I tried to add this on our project using Nuxt3.

"vue-mention": "^2.0.0-alpha.3" and "floating-vue": "^2.0.0-beta.24",

When I select a suggestion from the popover, it becomes @undefined.

here's my code

<script setup>
import { Mentionable } from 'vue-mention'
import 'floating-vue/dist/style.css'

const props = defineProps({
  taskId: {
    type: Number,
    required: true,
  },
  taskMembers: {
    type: Array,
    required: true,
  },
  user: {
    type: Object,
    required: true,
  },
})

const message = ref('')
const members = ref(props.taskMembers)
</script>

<Mentionable :keys="['@']" :items="members" placement="bottom" insert-space>
  <ElementsAppTextarea
    id="comment"
    v-model="message"
    name="comment"
    placeholder="Type @ to mention and notify member."
  />

  <template #no-result>
    <div class="p-1 text-sm">No result</div>
  </template>

  <template #item="{ item }">
    <span class="text-sm"> @{{ item.name }} </span>
  </template>
</Mentionable>


@claide claide changed the title Got @undefined Got @undefined in Vue3 Aug 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant