Files
public-html2/parcoursup/components/search-bar.riot
T

27 lines
506 B
Plaintext
Raw Normal View History

<search-bar>
2026-03-31 17:58:49 +02:00
<div class="search-bar">
<input
type="text"
2026-03-31 17:55:55 +02:00
placeholder="Ex : BUT informatique"
oninput={ updateQuery }
value={ state.query }
/>
<button onclick={ submitSearch }>Rechercher</button>
</div>
<script>
export default {
state: {
2026-03-31 17:55:55 +02:00
query: ''
},
updateQuery(e) {
2026-03-31 17:55:55 +02:00
this.update({ query: e.target.value })
2026-03-20 03:06:30 +01:00
},
2026-03-20 01:51:08 +01:00
submitSearch() {
2026-03-31 17:55:55 +02:00
this.props.onsearch(this.state.query)
}
2026-03-31 17:55:55 +02:00
}
</script>
2026-03-31 17:55:55 +02:00
</search-bar>