Fixed ##7073 - AutoComplete: context option updates
parent
81ac3639c1
commit
f4777982ce
|
@ -280,6 +280,14 @@ export interface AutoCompleteState {
|
|||
* Defines current options in AutoComplete component.
|
||||
*/
|
||||
export interface AutoCompleteContext {
|
||||
/**
|
||||
* Current option.
|
||||
*/
|
||||
option?: any;
|
||||
/**
|
||||
* Index of the current option.
|
||||
*/
|
||||
index: number;
|
||||
/**
|
||||
* Current selection state of the item as a boolean.
|
||||
* @defaultValue false
|
||||
|
|
|
@ -278,6 +278,8 @@ export default {
|
|||
getPTOptions(option, itemOptions, index, key) {
|
||||
return this.ptm(key, {
|
||||
context: {
|
||||
option,
|
||||
index,
|
||||
selected: this.isSelected(option),
|
||||
focused: this.focusedOptionIndex === this.getOptionIndex(index, itemOptions),
|
||||
disabled: this.isOptionDisabled(option)
|
||||
|
|
Loading…
Reference in New Issue