Trigger change when updating selected route type.

This commit is contained in:
2021-09-07 15:37:19 +02:00
parent ac52186b38
commit c50b1846fe
2 changed files with 8 additions and 2 deletions

2
dist/js/field.js vendored

File diff suppressed because one or more lines are too long

View File

@@ -8,13 +8,14 @@
/> />
<div v-if="edit" class="flex block my-2"> <div v-if="edit" class="flex block my-2">
<p><b>Velg rute type:</b></p>
<div v-for="option in routeTypes" class="ml-2"> <div v-for="option in routeTypes" class="ml-2">
<input <input
type="radio" type="radio"
:id="option.value" :id="option.value"
:checked="option.value === selectedRouteType" :checked="option.value === selectedRouteType"
:value="option.value" :value="option.value"
@change="e => selectedRouteType = e.target.value"> @change="updatedRouteType">
<label :for="option.value">{{ option.name }}</label> <label :for="option.value">{{ option.name }}</label>
</div> </div>
</div> </div>
@@ -80,6 +81,11 @@ export default {
}); });
}, },
updateRouteType(event) {
this.selectedRouteType = event.target.value;
this.triggerChange();
},
async triggerChange(markers) { async triggerChange(markers) {
if (markers.length === 0) { if (markers.length === 0) {
return; return;