Fix filter field position when rebuilding filterable item list
authorMatthias Schmidt <gravatronics@live.com>
Sat, 28 Dec 2019 17:31:31 +0000 (18:31 +0100)
committerMatthias Schmidt <gravatronics@live.com>
Sat, 28 Dec 2019 17:31:31 +0000 (18:31 +0100)
See 7308a8fa1a28ea6515f3656a5356d895b1a5c042

wcfsetup/install/files/js/WoltLabSuite/Core/Ui/ItemList/Filter.js

index 599fabcf1ca25b325fd79cb1ce90904393b49434..6f15ea54c3b78e9df713555e35312f0675af82e3 100644 (file)
@@ -219,7 +219,12 @@ define(['Core', 'EventKey', 'Language', 'List', 'StringUtil', 'Dom/Util', 'Ui/Si
                                }
                        });
                        
-                       this._container.insertBefore(this._fragment.firstChild, this._container.firstChild);
+                       if (this._options.filterPosition === 'bottom') {
+                               this._container.insertBefore(this._fragment.firstChild, this._container.firstChild);
+                       }
+                       else {
+                               this._container.appendChild(this._fragment.firstChild);
+                       }
                        this._value = value;
                        
                        elInnerError(this._container, (hasVisibleItems) ? false : Language.get('wcf.global.filter.error.noMatches'));