Explorar o código

disable geoloc button while it is not working

Olivier Massot %!s(int64=4) %!d(string=hai) anos
pai
achega
0becbd8d20
Modificáronse 1 ficheiros con 3 adicións e 2 borrados
  1. 3 2
      components/Ui/Search/Address.vue

+ 3 - 2
components/Ui/Search/Address.vue

@@ -15,7 +15,6 @@
       outlined
       append-icon="mdi-crosshairs-gps"
       @change="$emit('change', $event ? $event.value : '')"
-      @click:append="geolocalizeUser"
     />
     <v-snackbar :value="errorMsg !== ''">
       {{ errorMsg }}
@@ -153,9 +152,11 @@ export default Vue.extend({
       if (navigator.geolocation) {
         navigator.geolocation.getCurrentPosition(
           (position: { coords: { longitude: number, latitude: number }}) => {
+            this.clear()
             this.model = {
               text: this.$t('my_position') as string,
-              value: { longitude: position.coords.longitude, latitude: position.coords.latitude }
+              value: { longitude: position.coords.longitude, latitude: position.coords.latitude },
+              disabled: false
             }
           },
           () => {