mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-02-11 01:14:30 +08:00
Fix changed sample type and sample group in sample edit [SCI-811]
This commit is contained in:
parent
3f930ccfce
commit
a3d9e25feb
1 changed files with 2 additions and 2 deletions
|
@ -785,7 +785,7 @@ function createSampleTypeSelect(data, selected) {
|
|||
$.each(data, function(i, val) {
|
||||
var $option = $('<option></option>')
|
||||
.attr('value', val.id).text(val.name);
|
||||
if((i + 1) === selected) {
|
||||
if(val.id === selected) {
|
||||
$option.attr('selected', true);
|
||||
}
|
||||
$selectType.append($option);
|
||||
|
@ -814,7 +814,7 @@ function createSampleGroupSelect(data, selected) {
|
|||
var $option = $('<option></option>')
|
||||
.attr('value', val.id).text(val.name)
|
||||
.attr('data-content', $span.prop('outerHTML') + ' ' + val.name);
|
||||
if((i + 1) === selected) {
|
||||
if(val.id === selected) {
|
||||
$option.attr('selected', true);
|
||||
}
|
||||
$selectGroup.append($option);
|
||||
|
|
Loading…
Reference in a new issue