blob: ffc22c2113dce1fb73d43b13a2aab7faaca12e7a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
<script>
export default {
props: {
currentRequest: {
type: Object,
required: true,
},
requests: {
type: Array,
required: true,
},
},
data() {
return {
currentRequestId: this.currentRequest.id,
};
},
watch: {
currentRequestId(newRequestId) {
this.$emit('change-current-request', newRequestId);
},
},
};
</script>
<template>
<div id="peek-request-selector" data-qa-selector="request_dropdown" class="view">
<select v-model="currentRequestId">
<option
v-for="request in requests"
:key="request.id"
:value="request.id"
data-qa-selector="request_dropdown_option"
>
{{ request.truncatedUrl }}
</option>
</select>
</div>
</template>
|