Merge branch 'master' into v4

This commit is contained in:
Cagatay Civici 2024-04-01 01:39:50 +03:00
commit 5700f617cd
12 changed files with 72 additions and 10 deletions

View file

@ -251,6 +251,14 @@ export interface DropdownState {
* Defines current options in Dropdown component.
*/
export interface DropdownContext {
/**
* Current item option.
*/
option: any;
/**
* Current item index.
*/
index: number;
/**
* Current selection state of the item as a boolean.
* @defaultValue false

View file

@ -277,6 +277,8 @@ export default {
getPTItemOptions(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)