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