Mercurial > lada > lada-client
diff app/view/grid/Status.js @ 1037:56922c5c21fd
Preselect erzeuger if combobox contains only one object.
author | Raimund Renkert <raimund.renkert@intevation.de> |
---|---|
date | Thu, 18 Feb 2016 13:35:54 +0100 |
parents | 859e2e9859cd |
children | 8e579acfe0b1 |
line wrap: on
line diff
--- a/app/view/grid/Status.js Thu Feb 18 11:48:41 2016 +0100 +++ b/app/view/grid/Status.js Thu Feb 18 13:35:54 2016 +0100 @@ -104,7 +104,13 @@ displayField: 'messStelle', valueField: 'id', allowBlank: false, - editable: false + editable: false, + afterRender: function() { + this.superclass.afterRender.apply(this, arguments); + if (this.store.count() === 1) { + this.setValue(this.store.getAt(0)); + } + } }, sortable: false }, {