/**
* 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
*/
public function __construct( array $config = [] ) {
$config = array_merge( [
+ 'maxLength' => null,
'icon' => 'search',
], $config );
- // Parent constructor
parent::__construct( $config );
// Properties, which are ignored in PHP and just shipped back to JS
if ( $this->dataLocation ) {
$config['dataLocation'] = $this->dataLocation;
}
+ $config['$overlay'] = true;
return parent::getConfig( $config );
}
}