From 22004facdd43283b092d0db93e9dcb3f364c6f85 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Tue, 8 Mar 2016 19:25:46 +0100 Subject: [PATCH] Added support for missing "select" callback --- wcfsetup/install/files/js/WoltLab/WCF/Ui/Search/Input.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/wcfsetup/install/files/js/WoltLab/WCF/Ui/Search/Input.js b/wcfsetup/install/files/js/WoltLab/WCF/Ui/Search/Input.js index 464b238ee4..642f37e697 100644 --- a/wcfsetup/install/files/js/WoltLab/WCF/Ui/Search/Input.js +++ b/wcfsetup/install/files/js/WoltLab/WCF/Ui/Search/Input.js @@ -216,7 +216,12 @@ define(['Ajax', 'Core', 'EventKey', 'Dom/Util', 'Ui/SimpleDropdown'], function(A * @protected */ _selectItem: function(item) { - this._element.value = elData(item, 'label'); + if (this._options.callbackSelect && this._options.callbackSelect(item) === false) { + this._element.value = ''; + } + else { + this._element.value = elData(item, 'label'); + } this._activeItem = null; UiSimpleDropdown.close(this._dropdownContainerId); -- 2.20.1