Constructor
new OO.ui.mixin.IndicatorElement([config])abstract
#
IndicatorElement is often mixed into other classes to generate an indicator. Indicators are small graphics that are generally used in two ways:
- To draw attention to the status of an item. For example, an indicator might be used to show that an item in a list has errors that need to be resolved.
- To clarify the function of a control that acts in an exceptional way (a button that opens a menu instead of performing an action directly, for example).
For a list of indicators included in the library, please see the OOUI documentation on MediaWiki.
Note that indicators don't come with any functionality by default. See e.g.
SearchInputWidget
for a working 'clear' or
ComboBoxInputWidget
for a working 'down' indicator.
Parameters:
Name | Type | Attributes | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
config |
Object |
optional |
Configuration options Properties:
|
- Source:
Properties
indicatorstatic
#
Symbolic name of the indicator (e.g. ‘required’ or ‘down’). The static property will be overridden if the #indicator configuration is used.
Properties:
Type | Description |
---|---|
string
|
null
|
- Source:
indicatorTitlestatic
#
A text string used as the indicator title, a function that returns title text, or null
for no title. The static property will be overridden if the #indicatorTitle configuration is
used.
Properties:
Type | Description |
---|---|
string
|
function
|
null
|
- Source:
A text string used as the indicator title, a function that returns title text, or null
for no title.
Methods
getIndicator() → {string|null
}
#
null
}
#
Get the symbolic name of the indicator (e.g., ‘required’ or ‘down’).
- Source:
Returns:
Symbolic name of indicator, null if not set
- Type
-
string
|
null
setIndicator(indicator) → {OO.ui.Element}chainable
#
Set the indicator by its symbolic name. Built-in names currently include ‘clear’, ‘up’,
‘down’ and ‘required’ (declared via indicators.json). Use null
to remove the indicator.
Parameters:
Name | Type | Description |
---|---|---|
indicator |
string
|
null
|
Symbolic name of indicator, or |
- Source:
Returns:
The element, for chaining
- Type
- OO.ui.Element