Riot.js Bug Report Template
HTML
<script src="https://cdn.jsdelivr.net/g/[email protected](riot.min.js+compiler.min.js)"></script>
<my-tag></my-tag>
<script type="riot/tag">
<my-tag>
<div class="form-item clearfix form-select-inline">
<div class="form-item">
<select name="brand" onchange={ change_select_show_model }>
<option each={ brands } value="{ value }" data-value="{ text }">{ text }</option>
</select>
</div>
</div>
<p if={ model_show } class="title">Modèle</p>
<div if={ model_show } class="form-item clearfix form-select-inline">
<div class="form-item">
<select name="model">
<option each={ model } value="{ identifiant }" data-value="{ libelle }">{ libelle }</option>
</select>
</div>
</div>
this.model_show = false
this.brands = []
this.model = []
this.on('mount', function() {
this.brands = [
{ value: "0", text: '-- veuillez choisir --' },
{ value: "1", text: 'marque' }
]
this.update()
})
change_select_show_model(e) {
this.model_show = true
this.model = [
{ identifiant: 0, libelle: '-- veuillez choisir --' },
{ identifiant: 1, libelle: 'test' }
]
this.update()
}
</my-tag>
</script>
CSS
body {
font-family: sans-serif;
}
JavaScript
/**
* Riot.js is loaded from External Resources
* https://cdn.jsdelivr.net/g/[email protected](riot.min.js+compiler.min.js)
*/
riot.mount('*')