cinema/kind.riot

24 lines
546 B
Plaintext
Raw Normal View History

2022-04-01 23:57:59 +02:00
<kind>
<select onchange="{ select }" name="genre-names" value="1">
<option each={genre in this.state.genreList} value="{this.genreList.name}"> {this.genreList.name}</option>
</select>
<button onclick="{ obetirgenre }" > Ajouter </button>
<script>
export default{
onBeforeMount (props,state) {
this.state = {
genreList : []
}
},
async obetirgenre() {
let genres = await this.sa.getGenres()
this.update({genreList : genre})
console.log(genreList)
}
}
</script>
</kind>