changeset 604:5b6af8d1f3a3

fix rendering on mobile
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 08 Sep 2026 17:42:16 +0200
parents f72b20cbd84e
children 5b30b8d2b9e8
files ViewerPlugin/WebApplication/viewer.html ViewerPlugin/WebApplication/viewer.js
diffstat 2 files changed, 14 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/ViewerPlugin/WebApplication/viewer.html	Mon Sep 07 20:58:51 2026 +0200
+++ b/ViewerPlugin/WebApplication/viewer.html	Tue Sep 08 17:42:16 2026 +0200
@@ -568,8 +568,8 @@
               </label>
               <div class="input-group input-group-sm mb-1">
                 <input type="text" class="form-control" placeholder="Type to search or enter a user ID..."
-                       v-model="shareLayerSearchQuery"
-                       v-on:input="ShareLayerSearchUsers()"
+                       :value="shareLayerSearchQuery"
+                       v-on:input="ShareLayerSearchUsers($event.target.value)"
                        v-on:keydown.enter="ShareLayerAddStandardUser(shareLayerSearchQuery)">
                 <button class="btn btn-outline-secondary" type="button"
                         v-on:click="ShareLayerAddStandardUser(shareLayerSearchQuery)">Add</button>
@@ -609,8 +609,8 @@
                 <label class="form-label small mb-1">User</label>
                 <input type="text" class="form-control form-control-sm"
                        placeholder="Type to search a user..."
-                       v-model="importUserSearchQuery"
-                       v-on:input="ImportUserSearchChanged()">
+                       :value="importUserSearchQuery"
+                       v-on:input="ImportUserSearchChanged($event.target.value)">
                 <div v-if="importUserSearchResults.length > 0"
                      class="list-group list-group-flush mt-1 border rounded"
                      style="max-height:8em; overflow-y:auto">
--- a/ViewerPlugin/WebApplication/viewer.js	Mon Sep 07 20:58:51 2026 +0200
+++ b/ViewerPlugin/WebApplication/viewer.js	Tue Sep 08 17:42:16 2026 +0200
@@ -1183,7 +1183,10 @@
       this.shareLayerSearchResults = [];
     },
 
-    ShareLayerSearchUsers: function() {
+    ShareLayerSearchUsers: function(newQuery) {
+      if (newQuery !== undefined) {
+        this.shareLayerSearchQuery = newQuery;
+      }
       var query = this.shareLayerSearchQuery.trim();
       if (!query) {
         this.shareLayerSearchResults = [];
@@ -1228,13 +1231,18 @@
                  this.CreatePostPayload({}))
         .then(function(response) {
           that.importAvailableUsers = response.data;
+          that.ImportUserSearchChanged();
         })
         .catch(function() {
           console.error('Cannot load users sharing layers');
         });
     },
 
-    ImportUserSearchChanged: function() {
+    ImportUserSearchChanged: function(newQuery) {
+      if (newQuery !== undefined) {
+        this.importUserSearchQuery = newQuery;
+      }
+
       this.importSelectedUser = '';
       this.importSelectedLayer = '';
       this.importAvailableLayers = [];