Commit c0e1df00 authored by dagal's avatar dagal
Browse files

Use template for stop label

parent cee15ef7
<template>
<div class="trippy-search-field">
<autocomplete v-model="selectedStop" :options="stops" option-key="id"
option-label="name" :placeholder="placeholder" :get-option-description="getDescription"></autocomplete>
option-label="name" :placeholder="placeholder">
<template v-slot:option="data">
{{data.option.name}} ({{data.option.lines.map(l => l.short_name).join()}})
</template>
</autocomplete>
</div>
</template>
......@@ -36,12 +40,6 @@
this.$emit("input", s);
}
}
},
methods: {
getDescription(option) {
return `${option.name} (${option.lines.map(l => l.short_name).join()})`
}
}
}
</script>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment