I use axios to send data to v-select, but the content is in html format.
I want to use v-html to convert text but it is unsuccessful.
<v-select
:items="quizs"
item-text="questiontext"
item-value="id"
v-model="quizid"
></v-select>
I use axios to send data to v-select, but the content is in html format.
I want to use v-html to convert text but it is unsuccessful.
<v-select
:items="quizs"
item-text="questiontext"
item-value="id"
v-model="quizid"
></v-select>
You could use template inside v-select for your custom display. Then use v-html to decode html tags as below :
<v-select :items='quizs' v-model="quizid">
<template v-slot:item='{item}'>
<div v-html='item.questiontext'/>
</template>
<template v-slot:selection='{item}'>
<div v-html='item.questiontext'/>
</template>
</v-select>