From 1799631d60c1a5c22e07f2434654f681a167142a Mon Sep 17 00:00:00 2001 From: rlx Date: Tue, 19 Jan 2016 16:15:06 +0530 Subject: [PATCH] keep find element up to date --- static/js/findElement.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/static/js/findElement.js b/static/js/findElement.js index 3c5bae0..7b58fe6 100644 --- a/static/js/findElement.js +++ b/static/js/findElement.js @@ -46,7 +46,6 @@ oml.ui.findElement = function() { that.updateElement(); oml.$ui.findDialog = oml.ui.findDialog().open(); } else { - oml.$ui.findInput.options({ autocomplete: getAutocomplete(), placeholder: '' @@ -122,9 +121,7 @@ oml.ui.findElement = function() { }) .bindEvent({ oml_find: function() { - that.replaceElement( - 0, oml.$ui.findInSelect = renderFindInSelect() - ); + that.updateElement(); } }); @@ -210,6 +207,9 @@ oml.ui.findElement = function() { that.updateElement = function() { var findState = ui._findState; + that.replaceElement( + 0, oml.$ui.findInSelect = renderFindInSelect() + ); oml.$ui.findSelect.value(findState.key); oml.$ui.findInput.options( findState.key == 'advanced' ? {