From: Alexander Ebert Date: Tue, 8 Mar 2016 18:25:46 +0000 (+0100) Subject: Added support for missing "select" callback X-Git-Tag: 3.0.0_Beta_1~2030^2~54 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=22004facdd43283b092d0db93e9dcb3f364c6f85;p=GitHub%2FWoltLab%2FWCF.git Added support for missing "select" callback --- 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);