Selaa lähdekoodia

FDB Playground - auto-select strength if only 1

Vijayakrishnan 3 vuotta sitten
vanhempi
commit
3f293cf650
1 muutettua tiedostoa jossa 4 lisäystä ja 1 poistoa
  1. 4 1
      resources/views/app/fdb-pg/fdb-rx.blade.php

+ 4 - 1
resources/views/app/fdb-pg/fdb-rx.blade.php

@@ -397,8 +397,11 @@
                                 for (let i = 0; i < _data.length; i++) {
                                     strengthSelect.append('<option value="' + _data[i].gcn_seqno + '">' + _data[i].med_medid_desc + '</option>')
                                 }
+                                strengthSelect.prop('disabled', false);
+                                if(_data.length === 1) {
+                                    strengthSelect.val(_data[0].gcn_seqno).trigger('change');
+                                }
                             }, 'json');
-                            strengthSelect.prop('disabled', false);
                         });
 
                         // on strength (medid) selection