keep find element up to date

This commit is contained in:
rlx 2016-01-19 16:15:06 +05:30
parent 7a42473919
commit 1799631d60
1 changed files with 4 additions and 4 deletions

View File

@ -46,7 +46,6 @@ oml.ui.findElement = function() {
that.updateElement(); that.updateElement();
oml.$ui.findDialog = oml.ui.findDialog().open(); oml.$ui.findDialog = oml.ui.findDialog().open();
} else { } else {
oml.$ui.findInput.options({ oml.$ui.findInput.options({
autocomplete: getAutocomplete(), autocomplete: getAutocomplete(),
placeholder: '' placeholder: ''
@ -122,9 +121,7 @@ oml.ui.findElement = function() {
}) })
.bindEvent({ .bindEvent({
oml_find: function() { oml_find: function() {
that.replaceElement( that.updateElement();
0, oml.$ui.findInSelect = renderFindInSelect()
);
} }
}); });
@ -210,6 +207,9 @@ oml.ui.findElement = function() {
that.updateElement = function() { that.updateElement = function() {
var findState = ui._findState; var findState = ui._findState;
that.replaceElement(
0, oml.$ui.findInSelect = renderFindInSelect()
);
oml.$ui.findSelect.value(findState.key); oml.$ui.findSelect.value(findState.key);
oml.$ui.findInput.options( oml.$ui.findInput.options(
findState.key == 'advanced' ? { findState.key == 'advanced' ? {