Overview

Packages

  • bootstrap
    • behaviors
    • components
    • form
    • gii
    • helpers
    • widgets

Classes

  • TbActiveForm
  • TbAffix
  • TbAlert
  • TbBreadcrumb
  • TbButtonColumn
  • TbCollapse
  • TbDataColumn
  • TbDetailView
  • TbGridView
  • TbHeroUnit
  • TbListView
  • TbModal
  • TbNav
  • TbNavbar
  • TbPager
  • TbScrollspy
  • TbTabs
  • TbThumbnails
  • TbTypeAhead
  • Overview
  • Package
  • Class
  • Tree

Class TbTypeAhead

Bootstrap typeahead widget.

CInputWidget
Extended by TbTypeAhead
Package: bootstrap\widgets
Copyright: Copyright © Christoffer Niska 2013-
License: New BSD License
Author: Antonio Ramirez <ramirez.cobos@gmail.com>
Located at widgets/TbTypeAhead.php
Methods summary
public
# init( )

Widget's initialization method.

Widget's initialization method.

public
# initOptions( )

Initializes the plugin options

Initializes the plugin options

public
# run( )

Widget's run method.

Widget's run method.

public
# renderField( )

Renders field

Renders field

public
# registerClientScript( )

Register required scripts.

Register required scripts.

Properties summary
public mixed $source array()
#

the data source to query against. May be an array of strings or a function. The function is passed two arguments, the query value in the input field and the process callback. The function may be used synchronously by returning the data source directly or asynchronously via the process callback's single argument.

the data source to query against. May be an array of strings or a function. The function is passed two arguments, the query value in the input field and the process callback. The function may be used synchronously by returning the data source directly or asynchronously via the process callback's single argument.

public integer $items 8
#

the max number of items to display in the dropdown. Defaults to 8.

the max number of items to display in the dropdown. Defaults to 8.

public integer $minLength 1
#

the minimum character length needed before triggering autocomplete suggestions

the minimum character length needed before triggering autocomplete suggestions

public string $matcher
#

javascript function the method used to determine if a query matches an item. Accepts a single argument, the item against which to test the query. Access the current query with this.query. Return a boolean true if query is a match. Case insensitive.

javascript function the method used to determine if a query matches an item. Accepts a single argument, the item against which to test the query. Access the current query with this.query. Return a boolean true if query is a match. Case insensitive.

public string $sorter
#

javascript function method used to sort autocomplete results. Accepts a single argument items and has the scope of the typeahead instance. Reference the current query with this.query. Exact match, case sensitive, case insensitive

javascript function method used to sort autocomplete results. Accepts a single argument items and has the scope of the typeahead instance. Reference the current query with this.query. Exact match, case sensitive, case insensitive

public string $updater
#

javascript the method used to return selected item. Accepts a single argument, the item and has the scope of the typeahead instance. Returns selected item.

javascript the method used to return selected item. Accepts a single argument, the item and has the scope of the typeahead instance. Returns selected item.

public string $highlighter
#

javascript method used to highlight autocomplete results. Accepts a single argument item and has the scope of the typeahead instance. Should return html. Highlights all default matches

javascript method used to highlight autocomplete results. Accepts a single argument item and has the scope of the typeahead instance. Should return html. Highlights all default matches

protected array $pluginOptions array()
#

the plugin options

the plugin options

Yiistrap API documentation generated by ApiGen 2.8.0