Project

General

Profile

action #67393

Updated by JERiveraMoya almost 4 years ago

Selection of rows does not work as expected when rows are displayed in different order that are represented in JSON, or at least that it is my assumption. 
 I could see this happen in yast2 partitioner in the first table that is displayed for the partition of one disk. 
 So when trying to select /dev/vda3 (not even adding the column index) it is selecting /dev/vda2 and viceversa on the server side. 

 ```bash 
 curl -X POST "http://localhost:9998/widgets?id=%22Y2Partitioner%3A%3AWi 
 dgets%3A%3AConfigurableBlkDevicesTable%22&action=select&value=/dev/vda2" 

 curl -X POST "http://localhost:9998/widgets?id=%22Y2Partitioner%3A%3AWi 
 dgets%3A%3AConfigurableBlkDevicesTable%22&action=select&value=/dev/vda3" 
 ``` 
 ```json 
   { 
     "alignment" :  
     [ 
       "left", 
       "right", 
       "center", 
       "center", 
       "left", 
       "left", 
       "left" 
     ], 
     "class" : "YTable", 
     "columns" : 7, 
     "hasMultiSelection" : false, 
     "header" :  
     [ 
       "Device", 
       "Size", 
       "F", 
       "Enc", 
       "Type", 
       "Label", 
       "Mount Point" 
     ], 
     "hstretch" : true, 
     "icon_base_path" : "", 
     "id" : "\"Y2Partitioner::Widgets::ConfigurableBlkDevicesTable\"", 
     "immediate_mode" : true, 
     "items" :  
     [ 
       { 
         "icons" :  
         [ 
           "", 
           "", 
           "", 
           "", 
           "drive-harddisk", 
           "", 
           "" 
         ], 
         "labels" :  
         [ 
           "/dev/vda", 
           "30.00 GiB", 
           "", 
           "", 
           "Disk", 
           "", 
           "" 
         ] 
       }, 
       { 
         "icons" :  
         [ 
           "", 
           "", 
           "", 
           "", 
           "drive-partition", 
           "", 
           "" 
         ], 
         "labels" :  
         [ 
           "/dev/vda1", 
           "8.00 MiB", 
           "", 
           "", 
           "BIOS Boot Partition", 
           "", 
           "" 
         ] 
       }, 
       { 
         "icons" :  
         [ 
           "", 
           "", 
           "", 
           "", 
           "drive-partition", 
           "", 
           "" 
         ], 
         "labels" :  
         [ 
           "/dev/vda3", 
           "2.00 GiB", 
           "", 
           "", 
           "Swap Partition", 
           "", 
           "swap" 
         ] 
       }, 
       { 
         "icons" :  
         [ 
           "", 
           "", 
           "", 
           "", 
           "drive-partition", 
           "", 
           "" 
         ], 
         "labels" :  
         [ 
           "/dev/vda2", 
           "27.99 GiB", 
           "", 
           "", 
           "BtrFS Partition", 
           "", 
           "/" 
         ], 
         "selected" : true 
       } 
     ], 
     "items_count" : 4, 
     "keep_sorting" : false, 
     "notify" : true, 
     "vstretch" : true 
   } 
 ```

Back