Merge "Align "What's this" vertically"
[lhc/web/wiklou.git] / includes / widget / SearchInputWidget.php
index 47d3717..773c291 100644 (file)
@@ -10,17 +10,19 @@ namespace MediaWiki\Widget;
 /**
  * Search input widget.
  */
-class SearchInputWidget extends \OOUI\TextInputWidget {
+class SearchInputWidget extends TitleInputWidget {
 
        protected $pushPending = false;
        protected $performSearchOnClick = true;
+       protected $validateTitle = false;
+       protected $highlightFirst = false;
        protected $dataLocation = 'header';
 
        /**
         * @param array $config Configuration options
         * @param int|null $config['pushPending'] Whether the input should be visually marked as
         *  "pending", while requesting suggestions (default: false)
-        * @param boolean|null $config['performSearchOnClick'] If true, the script will start a search
+        * @param bool|null $config['performSearchOnClick'] If true, the script will start a search
         *  whenever a user hits a suggestion. If false, the text of the suggestion is inserted into the
         *  text field only (default: true)
         * @param string $config['dataLocation'] Where the search input field will be
@@ -28,6 +30,7 @@ class SearchInputWidget extends \OOUI\TextInputWidget {
         */
        public function __construct( array $config = [] ) {
                $config = array_merge( [
+                       'maxLength' => null,
                        'icon' => 'search',
                ], $config );