ProjetRIOT/components/search.riot
2023-03-25 20:29:49 +01:00

32 lines
825 B
Plaintext

<search>
<label>
<input oninput={search} type="input" placeholder= {state.formation}>
<p class="error"></p>
<div id="list-formations">
</div>
</label>
<script>
import model from '../javascript/modelSearch.js';
import Controller from '../javascript/controllerSearch.js';
import View from '../javascript/viewSearch.js';
export default function search(){
return {
onBeforeMount(props, state) {
// initial state
this.state = {
formation: props.formation
}
},
search(){
console.log("test1")
const view = new View()
const app = new Controller(view,model)
}
}
}
</script>
</search>